createLoginRequest
createLoginRequest: (
input: {
acsURL: string;
clientId: string;
redirectURI: string;
state?: string;
tenantId: string;
userContext: UserContext;
},
) => Promise<
| { redirectURI: string; status: "OK" }
| { status: "INVALID_CLIENT_ERROR" },
>
createOrUpdateClient
createOrUpdateClient: (
input: {
allowIDPInitiatedLogin?: boolean;
clientId?: string;
clientSecret?: string;
defaultRedirectURI: string;
enableRequestSigning?: boolean;
metadataXML: string;
redirectURIs: string[];
tenantId: string;
userContext: UserContext;
},
) => Promise<
| { status: "OK" } & SAMLClient
| { status: "INVALID_METADATA_XML_ERROR" | "DUPLICATE_IDP_ENTITY_ERROR" },
>
getUserInfo
getUserInfo: (
input: {
accessToken: string;
clientId: string;
tenantId: string;
userContext: UserContext;
},
) => Promise<
| {
claims: Record<string, any>;
email: string;
status: "OK";
sub: string;
}
| { status: "INVALID_TOKEN_ERROR" },
>
listClients
listClients: (
input: { tenantId: string; userContext: UserContext },
) => Promise<{ clients: SAMLClient[]; status: "OK" }>
removeClient
removeClient: (
input: { clientId: string; tenantId: string; userContext: UserContext },
) => Promise<{ didExist: boolean; status: "OK" }>
verifySAMLResponse
verifySAMLResponse: (
input: {
relayState: string | undefined;
samlResponse: string;
tenantId: string;
userContext: UserContext;
},
) => Promise<
| { redirectURI: string; status: "OK" }
| {
status:
| "SAML_RESPONSE_VERIFICATION_FAILED_ERROR"
| "INVALID_RELAY_STATE_ERROR"
| "INVALID_CLIENT_ERROR"
| "IDP_LOGIN_DISALLOWED_ERROR";
},
>