OAuth2
OAuth2 copied to clipboard
Alamofire and OAuth2DebugLogger
Hi,
I've noticed while experimenting with the Alamofire implementation of p2 that I don't receive the same chatty .debug logging that I'm used to with the DataLoader implementation.
Is this by design/limitation, or is my setup just messed up?
I'm using the standard oauth2.logger = OAuth2DebugLogger(.debug)
In the Alamofire implementation, what I've found is if there is not an access token, I'll get all the juicy details:
[Debug] OAuth2: Starting authorization
[Debug] OAuth2: No access token, checking if a refresh token is available
[Debug] OAuth2: I don't have a refresh token, not trying to refresh
[Debug] OAuth2: Adding “Authorization” header as “Basic client-key:client-secret”
[Debug] OAuth2: Requesting new access token from https://servername
[Debug] OAuth2: Did get access token [true]
[Debug] OAuth2: Storing tokens to keychain
... if there is a valid token, this is all I get:
[Debug] OAuth2: Initialization finished
... but in the DataLoader if there is a valid token, I'll get all of this:
[Debug] OAuth2: Starting authorization
[Debug] OAuth2: Have an apparently unexpired access token
[Debug] OAuth2: Storing tokens to keychain
Authorized! Access token is in `oauth2.accessToken`
Authorized! Additional parameters: [:]
Just making sure I'm not missing something - I would like being able to receive these messages w/ Alamofire, too.
Thanks!