projects/lib/src/types.ts
Represents an OpenID Connect discovery document
acr_values_supported |
acr_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:118
|
authorization_endpoint |
authorization_endpoint:
|
Type : string
|
Defined in projects/lib/src/types.ts:107
|
check_session_iframe |
check_session_iframe:
|
Type : string
|
Defined in projects/lib/src/types.ts:112
|
claim_types_supported |
claim_types_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:130
|
claims_parameter_supported |
claims_parameter_supported:
|
Type : boolean
|
Defined in projects/lib/src/types.ts:132
|
claims_supported |
claims_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:131
|
display_values_supported |
display_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:129
|
end_session_endpoint |
end_session_endpoint:
|
Type : string
|
Defined in projects/lib/src/types.ts:113
|
grant_types_supported |
grant_types_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:120
|
id_token_encryption_alg_values_supported |
id_token_encryption_alg_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:126
|
id_token_encryption_enc_values_supported |
id_token_encryption_enc_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:127
|
id_token_signing_alg_values_supported |
id_token_signing_alg_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:125
|
issuer |
issuer:
|
Type : string
|
Defined in projects/lib/src/types.ts:106
|
jwks_uri |
jwks_uri:
|
Type : string
|
Defined in projects/lib/src/types.ts:114
|
registration_endpoint |
registration_endpoint:
|
Type : string
|
Defined in projects/lib/src/types.ts:115
|
request_object_signing_alg_values_supported |
request_object_signing_alg_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:128
|
response_modes_supported |
response_modes_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:119
|
response_types_supported |
response_types_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:117
|
scopes_supported |
scopes_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:116
|
service_documentation |
service_documentation:
|
Type : string
|
Defined in projects/lib/src/types.ts:133
|
subject_types_supported |
subject_types_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:121
|
token_endpoint |
token_endpoint:
|
Type : string
|
Defined in projects/lib/src/types.ts:108
|
token_endpoint_auth_methods_supported |
token_endpoint_auth_methods_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:109
|
token_endpoint_auth_signing_alg_values_supported |
token_endpoint_auth_signing_alg_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:110
|
ui_locales_supported |
ui_locales_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:134
|
userinfo_encryption_alg_values_supported |
userinfo_encryption_alg_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:123
|
userinfo_encryption_enc_values_supported |
userinfo_encryption_enc_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:124
|
userinfo_endpoint |
userinfo_endpoint:
|
Type : string
|
Defined in projects/lib/src/types.ts:111
|
userinfo_signing_alg_values_supported |
userinfo_signing_alg_values_supported:
|
Type : string[]
|
Defined in projects/lib/src/types.ts:122
|
export class LoginOptions {
/**
* Is called, after a token has been received and
* successfully validated.
*
* Deprecated: Use property ``events`` on OAuthService instead.
*/
onTokenReceived?: (receivedTokens: ReceivedTokens) => void;
/**
* Hook, to validate the received tokens.
* Deprecated: Use property ``tokenValidationHandler`` on OAuthService instead.
*/
validationHandler?: (receivedTokens: ReceivedTokens) => Promise<any>;
/**
* Called when tryLogin detects that the auth server
* included an error message into the hash fragment.
*
* Deprecated: Use property ``events`` on OAuthService instead.
*/
onLoginError?: (params: object) => void;
/**
* A custom hash fragment to be used instead of the
* actual one. This is used for silent refreshes, to
* pass the iframes hash fragment to this method.
*/
customHashFragment?: string;
/**
* Set this to true to disable the oauth2 state
* check which is a best practice to avoid
* security attacks.
* As OIDC defines a nonce check that includes
* this, this can be set to true when only doing
* OIDC.
*/
disableOAuth2StateCheck?: boolean;
}
/**
* Defines a simple storage that can be used for
* storing the tokens at client side.
* Is compatible to localStorage and sessionStorage,
* but you can also create your own implementations.
*/
export abstract class OAuthStorage {
abstract getItem(key: string): string | null;
abstract removeItem(key: string): void;
abstract setItem(key: string, data: string): void;
}
/**
* Represents the received tokens, the received state
* and the parsed claims from the id-token.
*/
export class ReceivedTokens {
idToken: string;
accessToken: string;
idClaims?: object;
state?: string;
}
/**
* Represents the parsed and validated id_token.
*/
export interface ParsedIdToken {
idToken: string;
idTokenClaims: object;
idTokenHeader: object;
idTokenClaimsJson: string;
idTokenHeaderJson: string;
idTokenExpiresAt: number;
}
/**
* Represents the response from the token endpoint
* http://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint
*/
export interface TokenResponse {
access_token: string;
token_type: string;
expires_in: number;
refresh_token: string;
scope: string;
state?: string;
}
/**
* Represents the response from the user info endpoint
* http://openid.net/specs/openid-connect-core-1_0.html#UserInfo
*/
export interface UserInfo {
sub: string;
[key: string]: any;
}
/**
* Represents an OpenID Connect discovery document
*/
export interface OidcDiscoveryDoc {
issuer: string;
authorization_endpoint: string;
token_endpoint: string;
token_endpoint_auth_methods_supported: string[];
token_endpoint_auth_signing_alg_values_supported: string[];
userinfo_endpoint: string;
check_session_iframe: string;
end_session_endpoint: string;
jwks_uri: string;
registration_endpoint: string;
scopes_supported: string[];
response_types_supported: string[];
acr_values_supported: string[];
response_modes_supported: string[];
grant_types_supported: string[];
subject_types_supported: string[];
userinfo_signing_alg_values_supported: string[];
userinfo_encryption_alg_values_supported: string[];
userinfo_encryption_enc_values_supported: string[];
id_token_signing_alg_values_supported: string[];
id_token_encryption_alg_values_supported: string[];
id_token_encryption_enc_values_supported: string[];
request_object_signing_alg_values_supported: string[];
display_values_supported: string[];
claim_types_supported: string[];
claims_supported: string[];
claims_parameter_supported: boolean;
service_documentation: string;
ui_locales_supported: string[];
}