@ory/hydra-client
Version:
OpenAPI client for @ory/hydra-client
1,311 lines (1,308 loc) • 394 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Ory Hydra API
* Documentation for all of Ory Hydra\'s APIs.
*
* The version of the OpenAPI document: v2.4.0-alpha.1
* Contact: hi@ory.sh
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from './configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
import type { RequestArgs } from './base';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
/**
* Contains information on an device verification
* @export
* @interface AcceptDeviceUserCodeRequest
*/
export interface AcceptDeviceUserCodeRequest {
/**
*
* @type {string}
* @memberof AcceptDeviceUserCodeRequest
*/
'user_code'?: string;
}
/**
*
* @export
* @interface AcceptOAuth2ConsentRequest
*/
export interface AcceptOAuth2ConsentRequest {
/**
*
* @type {any}
* @memberof AcceptOAuth2ConsentRequest
*/
'context'?: any;
/**
*
* @type {Array<string>}
* @memberof AcceptOAuth2ConsentRequest
*/
'grant_access_token_audience'?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof AcceptOAuth2ConsentRequest
*/
'grant_scope'?: Array<string>;
/**
*
* @type {string}
* @memberof AcceptOAuth2ConsentRequest
*/
'handled_at'?: string;
/**
* Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.
* @type {boolean}
* @memberof AcceptOAuth2ConsentRequest
*/
'remember'?: boolean;
/**
* RememberFor sets how long the consent authorization should be remembered for in seconds. If set to `0`, the authorization will be remembered indefinitely.
* @type {number}
* @memberof AcceptOAuth2ConsentRequest
*/
'remember_for'?: number;
/**
*
* @type {AcceptOAuth2ConsentRequestSession}
* @memberof AcceptOAuth2ConsentRequest
*/
'session'?: AcceptOAuth2ConsentRequestSession;
}
/**
*
* @export
* @interface AcceptOAuth2ConsentRequestSession
*/
export interface AcceptOAuth2ConsentRequestSession {
/**
* AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the refresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection. If only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties can access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!
* @type {any}
* @memberof AcceptOAuth2ConsentRequestSession
*/
'access_token'?: any;
/**
* IDToken sets session data for the OpenID Connect ID token. Keep in mind that the session\'id payloads are readable by anyone that has access to the ID Challenge. Use with care!
* @type {any}
* @memberof AcceptOAuth2ConsentRequestSession
*/
'id_token'?: any;
}
/**
*
* @export
* @interface AcceptOAuth2LoginRequest
*/
export interface AcceptOAuth2LoginRequest {
/**
* ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.
* @type {string}
* @memberof AcceptOAuth2LoginRequest
*/
'acr'?: string;
/**
*
* @type {Array<string>}
* @memberof AcceptOAuth2LoginRequest
*/
'amr'?: Array<string>;
/**
*
* @type {any}
* @memberof AcceptOAuth2LoginRequest
*/
'context'?: any;
/**
* Extend OAuth2 authentication session lifespan If set to `true`, the OAuth2 authentication cookie lifespan is extended. This is for example useful if you want the user to be able to use `prompt=none` continuously. This value can only be set to `true` if the user has an authentication, which is the case if the `skip` value is `true`.
* @type {boolean}
* @memberof AcceptOAuth2LoginRequest
*/
'extend_session_lifespan'?: boolean;
/**
* ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client\'s configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.
* @type {string}
* @memberof AcceptOAuth2LoginRequest
*/
'force_subject_identifier'?: string;
/**
* IdentityProviderSessionID is the session ID of the end-user that authenticated. If specified, we will use this value to propagate the logout.
* @type {string}
* @memberof AcceptOAuth2LoginRequest
*/
'identity_provider_session_id'?: string;
/**
* Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.
* @type {boolean}
* @memberof AcceptOAuth2LoginRequest
*/
'remember'?: boolean;
/**
* RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie).
* @type {number}
* @memberof AcceptOAuth2LoginRequest
*/
'remember_for'?: number;
/**
* Subject is the user ID of the end-user that authenticated.
* @type {string}
* @memberof AcceptOAuth2LoginRequest
*/
'subject': string;
}
/**
* Create JSON Web Key Set Request Body
* @export
* @interface CreateJsonWebKeySet
*/
export interface CreateJsonWebKeySet {
/**
* JSON Web Key Algorithm The algorithm to be used for creating the key. Supports `RS256`, `ES256`, `ES512`, `HS512`, and `HS256`.
* @type {string}
* @memberof CreateJsonWebKeySet
*/
'alg': string;
/**
* JSON Web Key ID The Key ID of the key to be created.
* @type {string}
* @memberof CreateJsonWebKeySet
*/
'kid': string;
/**
* JSON Web Key Use The \"use\" (public key use) parameter identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Valid values are \"enc\" and \"sig\".
* @type {string}
* @memberof CreateJsonWebKeySet
*/
'use': string;
}
/**
*
* @export
* @interface CreateVerifiableCredentialRequestBody
*/
export interface CreateVerifiableCredentialRequestBody {
/**
*
* @type {string}
* @memberof CreateVerifiableCredentialRequestBody
*/
'format'?: string;
/**
*
* @type {VerifiableCredentialProof}
* @memberof CreateVerifiableCredentialRequestBody
*/
'proof'?: VerifiableCredentialProof;
/**
*
* @type {Array<string>}
* @memberof CreateVerifiableCredentialRequestBody
*/
'types'?: Array<string>;
}
/**
* Includes information about the supported verifiable credentials.
* @export
* @interface CredentialSupportedDraft00
*/
export interface CredentialSupportedDraft00 {
/**
* OpenID Connect Verifiable Credentials Cryptographic Binding Methods Supported Contains a list of cryptographic binding methods supported for signing the proof.
* @type {Array<string>}
* @memberof CredentialSupportedDraft00
*/
'cryptographic_binding_methods_supported'?: Array<string>;
/**
* OpenID Connect Verifiable Credentials Cryptographic Suites Supported Contains a list of cryptographic suites methods supported for signing the proof.
* @type {Array<string>}
* @memberof CredentialSupportedDraft00
*/
'cryptographic_suites_supported'?: Array<string>;
/**
* OpenID Connect Verifiable Credentials Format Contains the format that is supported by this authorization server.
* @type {string}
* @memberof CredentialSupportedDraft00
*/
'format'?: string;
/**
* OpenID Connect Verifiable Credentials Types Contains the types of verifiable credentials supported.
* @type {Array<string>}
* @memberof CredentialSupportedDraft00
*/
'types'?: Array<string>;
}
/**
* # Ory\'s OAuth 2.0 Device Authorization API
* @export
* @interface DeviceAuthorization
*/
export interface DeviceAuthorization {
/**
* The device verification code.
* @type {string}
* @memberof DeviceAuthorization
*/
'device_code'?: string;
/**
* The lifetime in seconds of the \"device_code\" and \"user_code\".
* @type {number}
* @memberof DeviceAuthorization
*/
'expires_in'?: number;
/**
* The minimum amount of time in seconds that the client SHOULD wait between polling requests to the token endpoint. If no value is provided, clients MUST use 5 as the default.
* @type {number}
* @memberof DeviceAuthorization
*/
'interval'?: number;
/**
* The end-user verification code.
* @type {string}
* @memberof DeviceAuthorization
*/
'user_code'?: string;
/**
* The end-user verification URI on the authorization server. The URI should be short and easy to remember as end users will be asked to manually type it into their user agent.
* @type {string}
* @memberof DeviceAuthorization
*/
'verification_uri'?: string;
/**
* A verification URI that includes the \"user_code\" (or other information with the same function as the \"user_code\"), which is designed for non-textual transmission.
* @type {string}
* @memberof DeviceAuthorization
*/
'verification_uri_complete'?: string;
}
/**
*
* @export
* @interface DeviceUserAuthRequest
*/
export interface DeviceUserAuthRequest {
/**
* ID is the identifier (\"device challenge\") of the device grant request. It is used to identify the session.
* @type {string}
* @memberof DeviceUserAuthRequest
*/
'challenge': string;
/**
*
* @type {OAuth2Client}
* @memberof DeviceUserAuthRequest
*/
'client'?: OAuth2Client;
/**
*
* @type {string}
* @memberof DeviceUserAuthRequest
*/
'handled_at'?: string;
/**
* RequestURL is the original Device Authorization URL requested.
* @type {string}
* @memberof DeviceUserAuthRequest
*/
'request_url'?: string;
/**
*
* @type {Array<string>}
* @memberof DeviceUserAuthRequest
*/
'requested_access_token_audience'?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof DeviceUserAuthRequest
*/
'requested_scope'?: Array<string>;
}
/**
* Error
* @export
* @interface ErrorOAuth2
*/
export interface ErrorOAuth2 {
/**
* Error
* @type {string}
* @memberof ErrorOAuth2
*/
'error'?: string;
/**
* Error Debug Information Only available in dev mode.
* @type {string}
* @memberof ErrorOAuth2
*/
'error_debug'?: string;
/**
* Error Description
* @type {string}
* @memberof ErrorOAuth2
*/
'error_description'?: string;
/**
* Error Hint Helps the user identify the error cause.
* @type {string}
* @memberof ErrorOAuth2
*/
'error_hint'?: string;
/**
* HTTP Status Code
* @type {number}
* @memberof ErrorOAuth2
*/
'status_code'?: number;
}
/**
*
* @export
* @interface GenericError
*/
export interface GenericError {
/**
* The status code
* @type {number}
* @memberof GenericError
*/
'code'?: number;
/**
* Debug information This field is often not exposed to protect against leaking sensitive information.
* @type {string}
* @memberof GenericError
*/
'debug'?: string;
/**
* Further error details
* @type {any}
* @memberof GenericError
*/
'details'?: any;
/**
* The error ID Useful when trying to identify various errors in application logic.
* @type {string}
* @memberof GenericError
*/
'id'?: string;
/**
* Error message The error\'s message.
* @type {string}
* @memberof GenericError
*/
'message': string;
/**
* A human-readable reason for the error
* @type {string}
* @memberof GenericError
*/
'reason'?: string;
/**
* The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
* @type {string}
* @memberof GenericError
*/
'request'?: string;
/**
* The status description
* @type {string}
* @memberof GenericError
*/
'status'?: string;
}
/**
*
* @export
* @interface GetVersion200Response
*/
export interface GetVersion200Response {
/**
* The version of Ory Hydra.
* @type {string}
* @memberof GetVersion200Response
*/
'version'?: string;
}
/**
*
* @export
* @interface HealthNotReadyStatus
*/
export interface HealthNotReadyStatus {
/**
* Errors contains a list of errors that caused the not ready status.
* @type {{ [key: string]: string; }}
* @memberof HealthNotReadyStatus
*/
'errors'?: { [key: string]: string; };
}
/**
*
* @export
* @interface HealthStatus
*/
export interface HealthStatus {
/**
* Status always contains \"ok\".
* @type {string}
* @memberof HealthStatus
*/
'status'?: string;
}
/**
* Introspection contains an access token\'s session data as specified by [IETF RFC 7662](https://tools.ietf.org/html/rfc7662)
* @export
* @interface IntrospectedOAuth2Token
*/
export interface IntrospectedOAuth2Token {
/**
* Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token\'s \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time).
* @type {boolean}
* @memberof IntrospectedOAuth2Token
*/
'active': boolean;
/**
* Audience contains a list of the token\'s intended audiences.
* @type {Array<string>}
* @memberof IntrospectedOAuth2Token
*/
'aud'?: Array<string>;
/**
* ID is aclient identifier for the OAuth 2.0 client that requested this token.
* @type {string}
* @memberof IntrospectedOAuth2Token
*/
'client_id'?: string;
/**
* Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire.
* @type {number}
* @memberof IntrospectedOAuth2Token
*/
'exp'?: number;
/**
* Extra is arbitrary data set by the session.
* @type {{ [key: string]: any; }}
* @memberof IntrospectedOAuth2Token
*/
'ext'?: { [key: string]: any; };
/**
* Issued at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued.
* @type {number}
* @memberof IntrospectedOAuth2Token
*/
'iat'?: number;
/**
* IssuerURL is a string representing the issuer of this token
* @type {string}
* @memberof IntrospectedOAuth2Token
*/
'iss'?: string;
/**
* NotBefore is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token is not to be used before.
* @type {number}
* @memberof IntrospectedOAuth2Token
*/
'nbf'?: number;
/**
* ObfuscatedSubject is set when the subject identifier algorithm was set to \"pairwise\" during authorization. It is the `sub` value of the ID Token that was issued.
* @type {string}
* @memberof IntrospectedOAuth2Token
*/
'obfuscated_subject'?: string;
/**
* Scope is a JSON string containing a space-separated list of scopes associated with this token.
* @type {string}
* @memberof IntrospectedOAuth2Token
*/
'scope'?: string;
/**
* Subject of the token, as defined in JWT [RFC7519]. Usually a machine-readable identifier of the resource owner who authorized this token.
* @type {string}
* @memberof IntrospectedOAuth2Token
*/
'sub'?: string;
/**
* TokenType is the introspected token\'s type, typically `Bearer`.
* @type {string}
* @memberof IntrospectedOAuth2Token
*/
'token_type'?: string;
/**
* TokenUse is the introspected token\'s use, for example `access_token` or `refresh_token`.
* @type {string}
* @memberof IntrospectedOAuth2Token
*/
'token_use'?: string;
/**
* Username is a human-readable identifier for the resource owner who authorized this token.
* @type {string}
* @memberof IntrospectedOAuth2Token
*/
'username'?: string;
}
/**
*
* @export
* @interface IsReady200Response
*/
export interface IsReady200Response {
/**
* Always \"ok\".
* @type {string}
* @memberof IsReady200Response
*/
'status'?: string;
}
/**
*
* @export
* @interface IsReady503Response
*/
export interface IsReady503Response {
/**
* Errors contains a list of errors that caused the not ready status.
* @type {{ [key: string]: string; }}
* @memberof IsReady503Response
*/
'errors'?: { [key: string]: string; };
}
/**
* A JSONPatch document as defined by RFC 6902
* @export
* @interface JsonPatch
*/
export interface JsonPatch {
/**
* This field is used together with operation \"move\" and uses JSON Pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
* @type {string}
* @memberof JsonPatch
*/
'from'?: string;
/**
* The operation to be performed. One of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\".
* @type {string}
* @memberof JsonPatch
*/
'op': string;
/**
* The path to the target path. Uses JSON pointer notation. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
* @type {string}
* @memberof JsonPatch
*/
'path': string;
/**
* The value to be used within the operations. Learn more [about JSON Pointers](https://datatracker.ietf.org/doc/html/rfc6901#section-5).
* @type {any}
* @memberof JsonPatch
*/
'value'?: any;
}
/**
*
* @export
* @interface JsonWebKey
*/
export interface JsonWebKey {
/**
* The \"alg\" (algorithm) parameter identifies the algorithm intended for use with the key. The values used should either be registered in the IANA \"JSON Web Signature and Encryption Algorithms\" registry established by [JWA] or be a value that contains a Collision- Resistant Name.
* @type {string}
* @memberof JsonWebKey
*/
'alg': string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'crv'?: string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'd'?: string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'dp'?: string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'dq'?: string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'e'?: string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'k'?: string;
/**
* The \"kid\" (key ID) parameter is used to match a specific key. This is used, for instance, to choose among a set of keys within a JWK Set during key rollover. The structure of the \"kid\" value is unspecified. When \"kid\" values are used within a JWK Set, different keys within the JWK Set SHOULD use distinct \"kid\" values. (One example in which different keys might use the same \"kid\" value is if they have different \"kty\" (key type) values but are considered to be equivalent alternatives by the application using them.) The \"kid\" value is a case-sensitive string.
* @type {string}
* @memberof JsonWebKey
*/
'kid': string;
/**
* The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\". \"kty\" values should either be registered in the IANA \"JSON Web Key Types\" registry established by [JWA] or be a value that contains a Collision- Resistant Name. The \"kty\" value is a case-sensitive string.
* @type {string}
* @memberof JsonWebKey
*/
'kty': string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'n'?: string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'p'?: string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'q'?: string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'qi'?: string;
/**
* Use (\"public key use\") identifies the intended use of the public key. The \"use\" parameter is employed to indicate whether a public key is used for encrypting data or verifying the signature on data. Values are commonly \"sig\" (signature) or \"enc\" (encryption).
* @type {string}
* @memberof JsonWebKey
*/
'use': string;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'x'?: string;
/**
* The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates [RFC5280]. The certificate chain is represented as a JSON array of certificate value strings. Each string in the array is a base64-encoded (Section 4 of [RFC4648] -- not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. The PKIX certificate containing the key value MUST be the first certificate.
* @type {Array<string>}
* @memberof JsonWebKey
*/
'x5c'?: Array<string>;
/**
*
* @type {string}
* @memberof JsonWebKey
*/
'y'?: string;
}
/**
* JSON Web Key Set
* @export
* @interface JsonWebKeySet
*/
export interface JsonWebKeySet {
/**
* List of JSON Web Keys The value of the \"keys\" parameter is an array of JSON Web Key (JWK) values. By default, the order of the JWK values within the array does not imply an order of preference among them, although applications of JWK Sets can choose to assign a meaning to the order for their purposes, if desired.
* @type {Array<JsonWebKey>}
* @memberof JsonWebKeySet
*/
'keys'?: Array<JsonWebKey>;
}
/**
* OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
* @export
* @interface OAuth2Client
*/
export interface OAuth2Client {
/**
* OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`.
* @type {string}
* @memberof OAuth2Client
*/
'access_token_strategy'?: string;
/**
*
* @type {Array<string>}
* @memberof OAuth2Client
*/
'allowed_cors_origins'?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof OAuth2Client
*/
'audience'?: Array<string>;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'authorization_code_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'authorization_code_grant_id_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'authorization_code_grant_refresh_token_lifespan'?: string;
/**
* OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.
* @type {boolean}
* @memberof OAuth2Client
*/
'backchannel_logout_session_required'?: boolean;
/**
* OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.
* @type {string}
* @memberof OAuth2Client
*/
'backchannel_logout_uri'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'client_credentials_grant_access_token_lifespan'?: string;
/**
* OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated.
* @type {string}
* @memberof OAuth2Client
*/
'client_id'?: string;
/**
* OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.
* @type {string}
* @memberof OAuth2Client
*/
'client_name'?: string;
/**
* OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost.
* @type {string}
* @memberof OAuth2Client
*/
'client_secret'?: string;
/**
* OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.
* @type {number}
* @memberof OAuth2Client
*/
'client_secret_expires_at'?: number;
/**
* OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.
* @type {string}
* @memberof OAuth2Client
*/
'client_uri'?: string;
/**
*
* @type {Array<string>}
* @memberof OAuth2Client
*/
'contacts'?: Array<string>;
/**
* OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client\'s creation.
* @type {string}
* @memberof OAuth2Client
*/
'created_at'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'device_authorization_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'device_authorization_grant_id_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'device_authorization_grant_refresh_token_lifespan'?: string;
/**
* OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.
* @type {boolean}
* @memberof OAuth2Client
*/
'frontchannel_logout_session_required'?: boolean;
/**
* OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.
* @type {string}
* @memberof OAuth2Client
*/
'frontchannel_logout_uri'?: string;
/**
*
* @type {Array<string>}
* @memberof OAuth2Client
*/
'grant_types'?: Array<string>;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'implicit_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'implicit_grant_id_token_lifespan'?: string;
/**
* OAuth 2.0 Client JSON Web Key Set Client\'s JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together.
* @type {any}
* @memberof OAuth2Client
*/
'jwks'?: any;
/**
* OAuth 2.0 Client JSON Web Key Set URL URL for the Client\'s JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client\'s encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key\'s intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.
* @type {string}
* @memberof OAuth2Client
*/
'jwks_uri'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'jwt_bearer_grant_access_token_lifespan'?: string;
/**
* OAuth 2.0 Client Logo URI A URL string referencing the client\'s logo.
* @type {string}
* @memberof OAuth2Client
*/
'logo_uri'?: string;
/**
*
* @type {any}
* @memberof OAuth2Client
*/
'metadata'?: any;
/**
* OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.
* @type {string}
* @memberof OAuth2Client
*/
'owner'?: string;
/**
* OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.
* @type {string}
* @memberof OAuth2Client
*/
'policy_uri'?: string;
/**
*
* @type {Array<string>}
* @memberof OAuth2Client
*/
'post_logout_redirect_uris'?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof OAuth2Client
*/
'redirect_uris'?: Array<string>;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'refresh_token_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'refresh_token_grant_id_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2Client
*/
'refresh_token_grant_refresh_token_lifespan'?: string;
/**
* OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration.
* @type {string}
* @memberof OAuth2Client
*/
'registration_access_token'?: string;
/**
* OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.
* @type {string}
* @memberof OAuth2Client
*/
'registration_client_uri'?: string;
/**
* OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.
* @type {string}
* @memberof OAuth2Client
*/
'request_object_signing_alg'?: string;
/**
*
* @type {Array<string>}
* @memberof OAuth2Client
*/
'request_uris'?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof OAuth2Client
*/
'response_types'?: Array<string>;
/**
* OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.
* @type {string}
* @memberof OAuth2Client
*/
'scope'?: string;
/**
* OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.
* @type {string}
* @memberof OAuth2Client
*/
'sector_identifier_uri'?: string;
/**
* SkipConsent skips the consent screen for this client. This field can only be set from the admin API.
* @type {boolean}
* @memberof OAuth2Client
*/
'skip_consent'?: boolean;
/**
* SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.
* @type {boolean}
* @memberof OAuth2Client
*/
'skip_logout_consent'?: boolean;
/**
* OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.
* @type {string}
* @memberof OAuth2Client
*/
'subject_type'?: string;
/**
* OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets.
* @type {string}
* @memberof OAuth2Client
*/
'token_endpoint_auth_method'?: string;
/**
* OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.
* @type {string}
* @memberof OAuth2Client
*/
'token_endpoint_auth_signing_alg'?: string;
/**
* OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.
* @type {string}
* @memberof OAuth2Client
*/
'tos_uri'?: string;
/**
* OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.
* @type {string}
* @memberof OAuth2Client
*/
'updated_at'?: string;
/**
* OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.
* @type {string}
* @memberof OAuth2Client
*/
'userinfo_signed_response_alg'?: string;
}
/**
* Lifespans of different token types issued for this OAuth 2.0 Client.
* @export
* @interface OAuth2ClientTokenLifespans
*/
export interface OAuth2ClientTokenLifespans {
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'authorization_code_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'authorization_code_grant_id_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'authorization_code_grant_refresh_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'client_credentials_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'device_authorization_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'device_authorization_grant_id_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'device_authorization_grant_refresh_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'implicit_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'implicit_grant_id_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'jwt_bearer_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'refresh_token_grant_access_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'refresh_token_grant_id_token_lifespan'?: string;
/**
* Specify a time duration in milliseconds, seconds, minutes, hours.
* @type {string}
* @memberof OAuth2ClientTokenLifespans
*/
'refresh_token_grant_refresh_token_lifespan'?: string;
}
/**
*
* @export
* @interface OAuth2ConsentRequest
*/
export interface OAuth2ConsentRequest {
/**
* ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.
* @type {string}
* @memberof OAuth2ConsentRequest
*/
'acr'?: string;
/**
*
* @type {Array<string>}
* @memberof OAuth2ConsentRequest
*/
'amr'?: Array<string>;
/**
* ID is the identifier (\"authorization challenge\") of the consent authorization request. It is used to identify the session.
* @type {string}
* @memberof OAuth2ConsentRequest
*/
'challenge': string;
/**
*
* @type {OAuth2Client}
* @memberof OAuth2ConsentRequest
*/
'client'?: OAuth2Client;
/**
*
* @type {any}
* @memberof OAuth2ConsentRequest
*/
'context'?: any;
/**
* DeviceChallenge is the device challenge this consent challenge belongs to, if this flow was initiated by a device.
* @type {string}
* @memberof OAuth2ConsentRequest
*/
'device_challenge_id'?: string;
/**
* LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login & consent app.
* @type {string}
* @memberof OAuth2ConsentRequest
*/
'login_challenge'?: string;
/**
* LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It\'s value can generally be used to associate consecutive login requests by a certain user.
* @type {string}
* @memberof OAuth2ConsentRequest
*/
'login_session_id'?: string;
/**
*
* @type {OAuth2ConsentRequestOpenIDConnectContext}
* @memberof OAuth2ConsentRequest
*/
'oidc_context'?: OAuth2ConsentRequestOpenIDConnectContext;
/**
* RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.
* @type {string}
* @memberof OAuth2ConsentRequest
*/
'request_url'?: string;
/**
*
* @type {Array<string>}
* @memberof OAuth2ConsentRequest
*/
'requested_access_token_audience'?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof OAuth2ConsentRequest
*/
'requested_scope'?: Array<string>;
/**
* Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call.
* @type {boolean}
* @memberof OAuth2ConsentRequest
*/
'skip'?: boolean;
/**
* Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client.
* @type {string}
* @memberof OAuth2ConsentRequest
*/
'subject'?: string;
}
/**
*
* @export
* @interface OAuth2ConsentRequestOpenIDConnectContext
*/
export interface OAuth2ConsentRequestOpenIDConnectContext {
/**
* ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.
* @type {Array<string>}
* @memberof OAuth2ConsentRequestOpenIDConnectContext
*/
'acr_values'?: Array<string>;
/**
* Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.
* @type {string}
* @memberof OAuth2ConsentRequestOpenIDConnectContext
*/
'display'?: string;
/**
* IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User\'s current or past authenticated session with the Client.
* @type {{ [key: string]: any; }}
* @memberof OAuth2ConsentRequestOpenIDConnectContext
*/
'id_token_hint_claims'?: { [key: string]: any; };
/**
* LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.
* @type {string}
* @memberof OAuth2ConsentRequestOpenIDConnectContext
*/
'login_hint'?: string;
/**
* UILocales is the End-User\'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.
* @type {Array<string>}
* @memberof OAuth2ConsentRequestOpenIDConnectContext
*/
'ui_locales'?: Array<string>;
}
/**
* A completed OAuth 2.0 Consent Session.
* @export
* @interface OAuth2ConsentSession
*/
export interface OAuth2ConsentSession {
/**
*
* @type {OAuth2ConsentRequest}
* @memberof OAuth2ConsentSession
*/
'consent_request'?: OAuth2ConsentRequest;
/**
*
* @type {any}
* @memberof OAuth2ConsentSession
*/
'context'?: any;
/**
*
* @type {OAuth2ConsentSessionExpiresAt}
* @memberof OAuth2ConsentSession
*/
'expires_at'?: OAuth2ConsentSessionExpiresAt;
/**
*
* @type {Array<string>}
* @memberof OAuth2ConsentSession
*/
'grant_access_token_audience'?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof OAuth2ConsentSession
*/
'grant_scope'?: Array<string>;
/**
*
* @type {string}
* @memberof OAuth2ConsentSession
*/
'handled_at'?: string;
/**
* Remember Consent Remember, if set to true, tells ORY Hydra to remember this consent authorization and reuse it if the same client asks the same user for the same, or a subset of, scope.
* @type {boolean}
* @memberof OAuth2ConsentSession
*/
'remember'?: boolean;
/**
* Remember Consent For RememberFor