@rockcarver/frodo-lib
Version:
A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.
198 lines • 8.57 kB
TypeScript
import { type OAuth2ClientSkeleton } from '../api/OAuth2ClientApi';
import { AccessTokenResponseType } from '../api/OAuth2OIDCApi';
import { OAuth2TrustedJwtIssuerSkeleton } from '../api/OAuth2TrustedJwtIssuerApi';
import { State } from '../shared/State';
import { JwkRsa, JwksInterface } from './JoseOps';
export type Admin = {
generateRfc7523AuthZGrantArtefacts(clientId: string, iss: string, jwk?: JwkRsa, sub?: string, scope?: string[], options?: {
save: boolean;
}): Promise<{
jwk: JwkRsa;
jwks: JwksInterface;
client: OAuth2ClientSkeleton;
issuer: OAuth2TrustedJwtIssuerSkeleton;
}>;
executeRfc7523AuthZGrantFlow(clientId: string, iss: string, jwk: JwkRsa, sub: string, scope?: string[]): Promise<AccessTokenResponseType>;
generateRfc7523ClientAuthNArtefacts(clientId: string, aud?: string, jwk?: JwkRsa, options?: {
save: boolean;
}): Promise<{
jwk: JwkRsa;
jwks: JwksInterface;
jwt: any;
client: OAuth2ClientSkeleton;
}>;
trainAA(apiKey: string, apiSecret: string, customUsernames?: string[], customUserAgents?: string[], customIPs?: string[], loginsPerUser?: number, service?: string): Promise<void>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
listOAuth2CustomClients(): Promise<string[]>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
listOAuth2AdminClients(): Promise<string[]>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
listNonOAuth2AdminStaticUserMappings(showProtected: boolean): Promise<string[]>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
addAutoIdStaticUserMapping(): Promise<void>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
grantOAuth2ClientAdminPrivileges(clientId: string): Promise<void>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
revokeOAuth2ClientAdminPrivileges(clientId: string): Promise<void>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
createOAuth2ClientWithAdminPrivileges(clientId: string, clientSecret: string): Promise<void>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
createLongLivedToken(clientId: string, clientSecret: string, scope: string, secret: string | boolean, lifetime: number): Promise<any>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
removeStaticUserMapping(subject: string): Promise<void>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
hideGenericExtensionAttributes(includeCustomized: boolean, dryRun: boolean): Promise<void>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
showGenericExtensionAttributes(includeCustomized: boolean, dryRun: boolean): Promise<void>;
/**
* @deprecated Deprecated since v2.0.0. This function may be removed in future versions. Similar functionality has been added to the frodo-cli code base.
* @group Deprecated
*/
repairOrgModel(excludeCustomized: boolean, extendPermissions: boolean, dryRun: boolean): Promise<void>;
};
declare const _default: (state: State) => Admin;
export default _default;
export declare function listOAuth2CustomClients({ state, }: {
state: State;
}): Promise<string[]>;
export declare function listOAuth2AdminClients({ state, }: {
state: State;
}): Promise<string[]>;
export declare function listNonOAuth2AdminStaticUserMappings({ showProtected, state, }: {
showProtected: boolean;
state: State;
}): Promise<string[]>;
export declare function addAutoIdStaticUserMapping({ state }: {
state: State;
}): Promise<void>;
export declare function grantOAuth2ClientAdminPrivileges({ clientId, state, }: {
clientId: string;
state: State;
}): Promise<void>;
export declare function revokeOAuth2ClientAdminPrivileges({ clientId, state, }: {
clientId: string;
state: State;
}): Promise<void>;
export declare function createOAuth2ClientWithAdminPrivileges({ clientId, clientSecret, state, }: {
clientId: string;
clientSecret: string;
state: State;
}): Promise<void>;
export declare function createLongLivedToken({ clientId, clientSecret, scope, secret, lifetime, state, }: {
clientId: string;
clientSecret: string;
scope: string;
secret: string | boolean;
lifetime: number;
state: State;
}): Promise<AccessTokenResponseType>;
export declare function removeStaticUserMapping({ subject, state, }: {
subject: string;
state: State;
}): Promise<void>;
export declare function hideGenericExtensionAttributes({ includeCustomized, dryRun, state, }: {
includeCustomized: boolean;
dryRun: boolean;
state: State;
}): Promise<void>;
export declare function showGenericExtensionAttributes({ includeCustomized, dryRun, state, }: {
includeCustomized: boolean;
dryRun: boolean;
state: State;
}): Promise<void>;
export declare function repairOrgModel({ excludeCustomized, extendPermissions, dryRun, state, }: {
excludeCustomized: boolean;
extendPermissions: boolean;
dryRun: boolean;
state: State;
}): Promise<void>;
export declare function getUniqueValues(values: string[]): string[];
export declare function pickRandomValue(values: string[]): string;
export declare function pickRandomNumber(max: number): number;
export declare function pickRandomValues(values: string[], picks: number): string[];
export declare function pickRandomUsername(customUsernames?: string[]): string;
export declare function pickRandomUserAgent(customUserAgents?: string[]): string;
export declare function pickRandomIPAddress(customIPs?: string[]): string;
export declare function sleep(ms: number): Promise<unknown>;
export declare function trainAA({ apiKey, apiSecret, customUsernames, customUserAgents, customIPs, loginsPerUser, service, state, }: {
apiKey: string;
apiSecret: string;
customUsernames?: string[];
customUserAgents?: string[];
customIPs?: string[];
loginsPerUser?: number;
service?: string;
state: State;
}): Promise<void>;
export declare function generateRfc7523AuthZGrantArtefacts({ clientId, iss, jwk, sub, scope, options, state, }: {
clientId: string;
iss: string;
jwk?: JwkRsa;
sub?: string;
scope?: string[];
options?: {
save: boolean;
};
state: State;
}): Promise<{
jwk: JwkRsa;
jwks: JwksInterface;
client: OAuth2ClientSkeleton;
issuer: OAuth2TrustedJwtIssuerSkeleton;
}>;
export declare function executeRfc7523AuthZGrantFlow({ clientId, iss, jwk, sub, scope, state, }: {
clientId: string;
iss: string;
jwk: JwkRsa;
sub: string;
scope?: string[];
state: State;
}): Promise<AccessTokenResponseType>;
export declare function generateRfc7523ClientAuthNArtefacts({ clientId, aud, jwk, options, state, }: {
clientId: string;
aud?: string;
jwk?: JwkRsa;
options?: {
save: boolean;
};
state: State;
}): Promise<{
jwk: JwkRsa;
jwks: JwksInterface;
jwt: any;
client: OAuth2ClientSkeleton;
}>;
//# sourceMappingURL=AdminOps.d.ts.map