-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86fff22
commit 3b98b6d
Showing
18 changed files
with
288 additions
and
144 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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
node_modules | ||
/dist | ||
src/@types | ||
src/okta/models |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module '@okta/configuration-validation'; |
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,22 @@ | ||
declare module '@okta/okta-auth-js'; | ||
|
||
declare interface TokenHash { | ||
[key: string] : Token; | ||
} | ||
declare interface ParseFromUrlResponse { | ||
tokens: TokenHash; | ||
state: string; | ||
} | ||
|
||
declare interface TokenAPI { | ||
getUserInfo(accessToken?: AccessToken, idToken?: IDToken): Promise; | ||
getWithRedirect(params?: object): Promise; | ||
parseFromUrl(): ParseFromUrlResponse; | ||
} | ||
|
||
declare class OktaAuth { | ||
userAgent: string; | ||
tokenManager: TokenManager; | ||
token: TokenAPI; | ||
signOut(options: object): Promise; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { UserClaims } from './user-claims'; | ||
|
||
export interface AccessToken { | ||
accessToken: string; | ||
} | ||
|
||
export interface IDToken { | ||
idToken: string; | ||
claims: UserClaims; | ||
} | ||
|
||
export type Token = AccessToken | IDToken; | ||
|
||
export interface TokenManager { | ||
get(key: string): Token; | ||
add(key: string, token: Token): void; | ||
on(event: string, handler: Function): void; | ||
off(event: string, handler: Function): void; | ||
} |
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,27 @@ | ||
/** | ||
* | ||
* This interface represents the union of possible known claims that are in an | ||
* ID Token or returned from the /userinfo response and depend on the | ||
* response_type and scope parameters in the authorize request | ||
*/ | ||
export interface UserClaims { | ||
auth_time?: Number; | ||
aud?: string; | ||
email?: string; | ||
email_verified?: Boolean; | ||
exp?: Number; | ||
family_name?: string; | ||
given_name?: string; | ||
iat?: Number; | ||
iss?: string; | ||
jti?: string; | ||
locale?: string; | ||
name?: string; | ||
nonce?: string; | ||
preferred_username?: string; | ||
sub: string; | ||
updated_at?: Number; | ||
ver?: Number; | ||
zoneinfo?: string; | ||
[propName: string]: any; // For custom claims that may be configured by the org admin | ||
} |
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.