Created
February 20, 2016 02:25
-
-
Save WilliamDenniss/941d9b2bc62d5f7ffac4 to your computer and use it in GitHub Desktop.
Creating an authorization request with AppAuth using the 'plain' PKCE challenge method.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// builds authentication request | |
NSString *state = [OIDAuthorizationRequest generateState]; | |
NSString *codeVerifier = [OIDAuthorizationRequest generateCodeVerifier]; | |
OIDAuthorizationRequest *request = | |
[[OIDAuthorizationRequest alloc] initWithConfiguration:configuration | |
clientId:kClientID | |
scope:@"openid profile" | |
redirectURL:redirectURI | |
responseType:OIDResponseTypeCode | |
state:state | |
codeVerifier:codeVerifier | |
codeChallenge:codeVerifier | |
codeChallengeMethod:@"plain" | |
additionalParameters:nil]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment