Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Adding support for Authorization Code Flow with PKCE
- Loading branch information
Showing
22 changed files
with
514 additions
and
344 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,3 +45,5 @@ Thumbs.db | |
/.firebase | ||
|
||
TODO.txt | ||
|
||
/pkce-demo |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"token_type": "Bearer", | ||
"expires_in": 3600, | ||
"access_token": "eyJraWQiOiJCMHcxTjVtU2FUM0RkS3ZXVHd6MnYyRk5XT3JMbGJ1elVJbElJVERHT19vIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULmp0N3huZTJhNFd2Xzh0ZUtWUUZ5cGJvaS0zYjhHbW54d2lzZlczVmNvNmciLCJpc3MiOiJodHRwczovL2Rldi0zMzU0Njcub2t0YS5jb20vb2F1dGgyL2RlZmF1bHQiLCJhdWQiOiJhcGk6Ly9kZWZhdWx0IiwiaWF0IjoxNTYzNjkxNzgyLCJleHAiOjE1NjM2OTUzODIsImNpZCI6IjBvYXRnYThlYkE0SWtHZzVVMzU2IiwidWlkIjoiMDB1dGdiN2hqQ2szNkVKMlMzNTYiLCJzY3AiOlsib3BlbmlkIiwiZW1haWwiLCJncm91cHMiLCJwcm9maWxlIiwiYWRkcmVzcyIsInBob25lIl0sInN1YiI6InJvYi5mZXJndXNvbkByb2JmZXJndXNvbi5vcmciLCJncm91cHMiOlsiRXZlcnlvbmUiLCJVc2VyIiwiQWRtaW5pc3RyYXRvciJdfQ.gbQJRhYuZJZJ53EWZ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EDdrqXQ4WjzVZalUhPYtbVmZN47zgPSqvgzLKCc-TIogpfFtL-d-RATdFTnT-M4z9UCr98xNEAFeEmGSlISDju63ucPIkBHlvb0MHwDmQyOS_Jn4BWXRulOLR5UHvY6BlRqekQXValfHUW2X1HC_BNLsJ-UMaxf4ErKDXrOHwE3vVbWK95xCLhOJRtqIqUd0zxUYsEmLJ9GWJm6vWaLBPvj6crg6HeUOOz0mLumS-iYoUS4JDyLXdFw8m44qCmfi69sLSIAOYD59X7HHlQRopwxlcLuHkV0gqg" | ||
} |
This file contains 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
25 changes: 0 additions & 25 deletions
25
projects/auth-okta/src/lib/components/callback/callback.component.spec.ts
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
projects/auth-okta/src/lib/components/callback/callback.component.ts
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
36 changes: 36 additions & 0 deletions
36
projects/okta-angular/src/lib/components/authorization-code/authorization-code.component.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
// import { ActivatedRoute } from '@angular/router'; | ||
|
||
import { OktaAuthService } from '../../services/auth/okta-auth.service'; | ||
|
||
@Component({ template: `` }) | ||
export class OktaAuthorizationCodeCallbackComponent implements OnInit { | ||
|
||
constructor(private authService: OktaAuthService) { | ||
} | ||
|
||
public ngOnInit() { | ||
|
||
this.authService.handleAuthorizationCodeFlow(); | ||
} | ||
|
||
} | ||
|
||
// https://stackoverflow.com/questions/38255939/how-to-handle-hash-fragments-from-oauth-redirect-urls-in-angular2-rc3-routing/ | ||
|
||
// OIDC Authorization Code Flow (OAuth2 Authorization Code Grant) | ||
|
||
/* | ||
constructor(private route: ActivatedRoute, | ||
private authService: OktaAuthService) { | ||
} | ||
const code = this.route.snapshot.paramMap.get('code'); | ||
const state = this.route.snapshot.paramMap.get('state'); | ||
console.log('code: ' + code + ' state: ' + state); | ||
this.authService.handleAuthorizationCodeFlow(code, state); | ||
*/ |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.