UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

124 lines 4.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.identityProviderSchema = exports.oidcIdentityProviderDataSchema = exports.samlIdentityProviderDataSchema = void 0; /** * @openapi * * components: * schemas: * TIdentityProviderType: * type: string * description: | * The Type of Identity Provider. Currently saml and oidc are supported. * enum: * - saml * - oidc */ const identityProviderTypes = ["saml", "oidc"]; exports.samlIdentityProviderDataSchema = { title: "identityProviderDataSchema", type: "object", additionalProperties: false, properties: { idpType: { type: "string", enum: ["saml"] }, idpIssuer: { type: "string", minLength: 1, maxLength: 5000 }, idpLoginEndpoint: { type: "string", minLength: 1, maxLength: 5000 }, idpLogoutEndpoint: { type: "string", minLength: 1, maxLength: 5000 }, idpCertificate: { type: "string", minLength: 1, maxLength: 15000 }, wantAuthnResponseSigned: { type: "boolean" }, decryptionPrivateKey: { type: "string", minLength: 1, maxLength: 15000 }, idpDisableRequestedAuthnContext: { type: "boolean" }, } }; /** * @openapi * * components: * schemas: * TIdpTokenEndpointAuthMethod: * type: string * description: | * Requested Client Authentication method for the Token Endpoint. * * https://openid.net/specs/openid-connect-core-1_0.html#ClientAuthentication * enum: * - client_secret_basic * - client_secret_post * - client_secret_jwt * - private_key_jwt * - tls_client_auth * - self_signed_tls_client_auth * - none * default: client_secret_basic * example: client_secret_basic */ const idpTokenEndpointAuthMethods = [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "tls_client_auth", "self_signed_tls_client_auth", "none", ]; /** * @openapi * * components: * schemas: * TIdpIdTokenSignedResponseAlg: * type: string * description: | * The Algorithm used to sign the ID Token issued to this Client. * enum: * - RS256 * - RS384 * - RS512 * - HS256 * - HS384 * - HS512 * default: RS256 * example: RS256 */ const idpIdTokenSignedResponseAlgs = [ "RS256", "RS384", "RS512", "HS256", "HS384", "HS512", ]; exports.oidcIdentityProviderDataSchema = { title: "identityProviderDataSchema", type: "object", additionalProperties: false, properties: { idpType: { type: "string", enum: ["oidc"] }, idpIssuer: { type: "string", format: "url", maxLength: 5000 }, idpClientId: { type: "string", minLength: 1, maxLength: 5000 }, idpClientSecret: { type: "string", minLength: 1, maxLength: 5000 }, idpAdditionalScope: { type: ["string", "null"], minLength: 0, maxLength: 5000 }, idpFrontChannelLogoutUrl: { anyOf: [ { type: "null" }, { type: "string", format: "url" } ] }, idpIdTokenSignedResponseAlg: { type: "string", enum: [...idpIdTokenSignedResponseAlgs] }, idpTokenEndpointAuthMethod: { type: "string", enum: [...idpTokenEndpointAuthMethods] }, } }; exports.identityProviderSchema = { title: "identityProviderSchema", type: "object", additionalProperties: false, oneOf: [ { properties: Object.assign({ _id: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } }, exports.samlIdentityProviderDataSchema.properties) }, { properties: Object.assign({ _id: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } }, exports.oidcIdentityProviderDataSchema.properties) } ] }; //# sourceMappingURL=IIdentityProvider.js.map