amazon-cognito-identity-js
- Version 6.3.16
- Published
- 1.39 MB
- 5 dependencies
- Apache-2.0 license
Install
npm i amazon-cognito-identity-jsyarn add amazon-cognito-identity-jspnpm add amazon-cognito-identity-jsOverview
Amazon Cognito Identity Provider JavaScript SDK
Index
Namespaces
amazon-cognito-identity-js
- appendToCognitoUserAgent()
- AuthenticationDetails
- ChallengeName
- ClientMetadata
- CodeDeliveryDetails
- CognitoAccessToken
- CognitoIdToken
- CognitoRefreshToken
- CognitoUser
- CognitoUserAttribute
- CognitoUserPool
- CognitoUserSession
- CookieStorage
- GetSessionOptions
- IAuthenticationCallback
- IAuthenticationDetailsData
- ICognitoStorage
- ICognitoUserAttributeData
- ICognitoUserData
- ICognitoUserPoolData
- ICognitoUserSessionData
- ICookieStorageData
- IMfaSettings
- ISignUpResult
- MFAOption
- NodeCallback
- UpdateAttributesNodeCallback
- UserAgent
- UserData
- WordArray
Namespaces
namespace amazon-cognito-identity-js
module 'amazon-cognito-identity-js' {}function appendToCognitoUserAgent
appendToCognitoUserAgent: (content: string) => void;class AuthenticationDetails
class AuthenticationDetails {}constructor
constructor(data: IAuthenticationDetailsData);method getPassword
getPassword: () => string;method getUsername
getUsername: () => string;method getValidationData
getValidationData: () => any[];class CognitoAccessToken
class CognitoAccessToken {}constructor
constructor({ AccessToken }: { AccessToken: string });property payload
payload: { [key: string]: any };method decodePayload
decodePayload: () => { [id: string]: any };method getExpiration
getExpiration: () => number;method getIssuedAt
getIssuedAt: () => number;method getJwtToken
getJwtToken: () => string;class CognitoIdToken
class CognitoIdToken {}constructor
constructor({ IdToken }: { IdToken: string });property payload
payload: { [key: string]: any };method decodePayload
decodePayload: () => { [id: string]: any };method getExpiration
getExpiration: () => number;method getIssuedAt
getIssuedAt: () => number;method getJwtToken
getJwtToken: () => string;class CognitoRefreshToken
class CognitoRefreshToken {}constructor
constructor({ RefreshToken }: { RefreshToken: string });method getToken
getToken: () => string;class CognitoUser
class CognitoUser {}constructor
constructor(data: ICognitoUserData);property challengeName
challengeName?: ChallengeName;method associateSoftwareToken
associateSoftwareToken: (callbacks: { associateSecretCode: (secretCode: string) => void; onFailure: (err: any) => void;}) => void;method authenticateUser
authenticateUser: ( authenticationDetails: AuthenticationDetails, callbacks: IAuthenticationCallback) => void;method changePassword
changePassword: ( oldPassword: string, newPassword: string, callback: NodeCallback<Error, 'SUCCESS'>, clientMetadata?: ClientMetadata) => void;method completeNewPasswordChallenge
completeNewPasswordChallenge: ( newPassword: string, requiredAttributeData: any, callbacks: IAuthenticationCallback, clientMetadata?: ClientMetadata) => void;method confirmPassword
confirmPassword: ( verificationCode: string, newPassword: string, callbacks: { onSuccess: (success: string) => void; onFailure: (err: Error) => void; }, clientMetaData?: ClientMetadata) => void;method confirmRegistration
confirmRegistration: ( code: string, forceAliasCreation: boolean, callback: NodeCallback<any, any>, clientMetadata?: ClientMetadata) => void;method deleteAttributes
deleteAttributes: ( attributeList: string[], callback: NodeCallback<Error, string>) => void;method deleteUser
deleteUser: (callback: NodeCallback<Error, string>) => void;method disableMFA
disableMFA: (callback: NodeCallback<Error, string>) => void;method enableMFA
enableMFA: (callback: NodeCallback<Error, string>) => void;method forgetDevice
forgetDevice: (callbacks: { onSuccess: (success: string) => void; onFailure: (err: Error) => void;}) => void;method forgetSpecificDevice
forgetSpecificDevice: ( deviceKey: string, callbacks: { onSuccess: (success: string) => void; onFailure: (err: Error) => void; }) => void;method forgotPassword
forgotPassword: ( callbacks: { onSuccess: (data: any) => void; onFailure: (err: Error) => void; inputVerificationCode?: (data: any) => void; }, clientMetaData?: ClientMetadata) => void;method getAttributeVerificationCode
getAttributeVerificationCode: ( name: string, callback: { onSuccess: (success: string) => void; onFailure: (err: Error) => void; inputVerificationCode?: (data: string) => void | null; }, clientMetadata?: ClientMetadata) => void;method getAuthenticationFlowType
getAuthenticationFlowType: () => string;method getCachedDeviceKeyAndPassword
getCachedDeviceKeyAndPassword: () => void;method getDevice
getDevice: (callbacks: { onSuccess: (success: string) => void; onFailure: (err: Error) => void;}) => any;method getMFAOptions
getMFAOptions: (callback: NodeCallback<Error, MFAOption[]>) => void;method getSession
getSession: ( callback: | ((error: Error, session: null) => void) | ((error: null, session: CognitoUserSession) => void), options?: GetSessionOptions) => void;method getSignInUserSession
getSignInUserSession: () => CognitoUserSession | null;method getUserAttributes
getUserAttributes: ( callback: NodeCallback<Error, CognitoUserAttribute[]>) => void;method getUserData
getUserData: (callback: NodeCallback<Error, UserData>, params?: any) => void;method getUsername
getUsername: () => string;method globalSignOut
globalSignOut: (callbacks: { onSuccess: (msg: string) => void; onFailure: (err: Error) => void;}) => void;method initiateAuth
initiateAuth: ( authenticationDetails: AuthenticationDetails, callbacks: IAuthenticationCallback) => void;method listDevices
listDevices: ( limit: number, paginationToken: string | null, callbacks: { onSuccess: (data: any) => void; onFailure: (err: Error) => void; }) => void;method refreshSession
refreshSession: ( refreshToken: CognitoRefreshToken, callback: NodeCallback<any, any>, clientMetadata?: ClientMetadata) => void;method resendConfirmationCode
resendConfirmationCode: ( callback: NodeCallback<Error, any>, clientMetaData?: ClientMetadata) => void;method sendCustomChallengeAnswer
sendCustomChallengeAnswer: ( answerChallenge: any, callback: IAuthenticationCallback, clientMetaData?: ClientMetadata) => void;method sendMFACode
sendMFACode: ( confirmationCode: string, callbacks: { onSuccess: ( session: CognitoUserSession, userConfirmationNecessary?: boolean ) => void; onFailure: (err: any) => void; }, mfaType?: string, clientMetadata?: ClientMetadata) => void;method sendMFASelectionAnswer
sendMFASelectionAnswer: ( answerChallenge: string, callbacks: { onSuccess: (session: CognitoUserSession) => void; onFailure: (err: any) => void; mfaRequired?: ( challengeName: ChallengeName, challengeParameters: any ) => void; totpRequired?: ( challengeName: ChallengeName, challengeParameters: any ) => void; }) => void;method setAuthenticationFlowType
setAuthenticationFlowType: (authenticationFlowType: string) => string;method setDeviceStatusNotRemembered
setDeviceStatusNotRemembered: (callbacks: { onSuccess: (success: string) => void; onFailure: (err: any) => void;}) => void;method setDeviceStatusRemembered
setDeviceStatusRemembered: (callbacks: { onSuccess: (success: string) => void; onFailure: (err: any) => void;}) => void;method setSignInUserSession
setSignInUserSession: (signInUserSession: CognitoUserSession) => void;method setUserMfaPreference
setUserMfaPreference: ( smsMfaSettings: IMfaSettings | null, softwareTokenMfaSettings: IMfaSettings | null, callback: NodeCallback<Error, string>) => void;method signOut
signOut: (callback?: () => void) => void;method updateAttributes
updateAttributes: ( attributes: (CognitoUserAttribute | ICognitoUserAttributeData)[], callback: UpdateAttributesNodeCallback<Error, string, any>, clientMetadata?: ClientMetadata) => void;method verifyAttribute
verifyAttribute: ( attributeName: string, confirmationCode: string, callbacks: { onSuccess: (success: string) => void; onFailure: (err: Error) => void; }) => void;method verifySoftwareToken
verifySoftwareToken: ( totpCode: string, friendlyDeviceName: string, callbacks: { onSuccess: (session: CognitoUserSession) => void; onFailure: (err: Error) => void; }) => void;class CognitoUserAttribute
class CognitoUserAttribute implements ICognitoUserAttributeData {}constructor
constructor(data: ICognitoUserAttributeData);property Name
Name: string;property Value
Value: string;method getName
getName: () => string;method getValue
getValue: () => string;method setName
setName: (name: string) => CognitoUserAttribute;method setValue
setValue: (value: string) => CognitoUserAttribute;method toJSON
toJSON: () => Object;method toString
toString: () => string;class CognitoUserPool
class CognitoUserPool {}constructor
constructor( data: ICognitoUserPoolData, wrapRefreshSessionCallback?: (target: NodeCallback.Any) => NodeCallback.Any);method getClientId
getClientId: () => string;method getCurrentUser
getCurrentUser: () => CognitoUser | null;method getUserPoolId
getUserPoolId: () => string;method getUserPoolName
getUserPoolName: () => string;method signUp
signUp: ( username: string, password: string, userAttributes: CognitoUserAttribute[], validationData: CognitoUserAttribute[], callback: NodeCallback<Error, ISignUpResult>, clientMetadata?: ClientMetadata) => void;class CognitoUserSession
class CognitoUserSession {}constructor
constructor(data: ICognitoUserSessionData);method getAccessToken
getAccessToken: () => CognitoAccessToken;method getIdToken
getIdToken: () => CognitoIdToken;method getRefreshToken
getRefreshToken: () => CognitoRefreshToken;method isValid
isValid: () => boolean;class CookieStorage
class CookieStorage implements ICognitoStorage {}constructor
constructor(data?: ICookieStorageData);method clear
clear: () => void;method getItem
getItem: (key: string) => string;method removeItem
removeItem: (key: string) => void;method setItem
setItem: (key: string, value: string) => void;class UserAgent
class UserAgent {}constructor
constructor();class WordArray
class WordArray {}constructor
constructor(words?: string[], sigBytes?: number);method random
random: (nBytes: number) => WordArray;method toString
toString: () => string;interface CodeDeliveryDetails
interface CodeDeliveryDetails {}property AttributeName
AttributeName: string;property DeliveryMedium
DeliveryMedium: string;property Destination
Destination: string;interface GetSessionOptions
interface GetSessionOptions {}property clientMetadata
clientMetadata: Record<string, string>;interface IAuthenticationCallback
interface IAuthenticationCallback {}property customChallenge
customChallenge?: (challengeParameters: any) => void;property mfaRequired
mfaRequired?: (challengeName: ChallengeName, challengeParameters: any) => void;property mfaSetup
mfaSetup?: (challengeName: ChallengeName, challengeParameters: any) => void;property newPasswordRequired
newPasswordRequired?: (userAttributes: any, requiredAttributes: any) => void;property onFailure
onFailure: (err: any) => void;property onSuccess
onSuccess: ( session: CognitoUserSession, userConfirmationNecessary?: boolean) => void;property selectMFAType
selectMFAType?: (challengeName: ChallengeName, challengeParameters: any) => void;property totpRequired
totpRequired?: (challengeName: ChallengeName, challengeParameters: any) => void;interface IAuthenticationDetailsData
interface IAuthenticationDetailsData {}property ClientMetadata
ClientMetadata?: ClientMetadata;property Password
Password?: string;property Username
Username: string;property ValidationData
ValidationData?: { [key: string]: any };interface ICognitoStorage
interface ICognitoStorage {}method clear
clear: () => void;method getItem
getItem: (key: string) => string | null;method removeItem
removeItem: (key: string) => void;method setItem
setItem: (key: string, value: string) => void;interface ICognitoUserAttributeData
interface ICognitoUserAttributeData {}interface ICognitoUserData
interface ICognitoUserData {}interface ICognitoUserPoolData
interface ICognitoUserPoolData {}property AdvancedSecurityDataCollectionFlag
AdvancedSecurityDataCollectionFlag?: boolean;property ClientId
ClientId: string;property endpoint
endpoint?: string;property Storage
Storage?: ICognitoStorage;property UserPoolId
UserPoolId: string;interface ICognitoUserSessionData
interface ICognitoUserSessionData {}property AccessToken
AccessToken: CognitoAccessToken;property IdToken
IdToken: CognitoIdToken;property RefreshToken
RefreshToken?: CognitoRefreshToken;interface ICookieStorageData
interface ICookieStorageData {}interface IMfaSettings
interface IMfaSettings {}property Enabled
Enabled: boolean;property PreferredMfa
PreferredMfa: boolean;interface ISignUpResult
interface ISignUpResult {}property codeDeliveryDetails
codeDeliveryDetails: CodeDeliveryDetails;property user
user: CognitoUser;property userConfirmed
userConfirmed: boolean;property userSub
userSub: string;interface MFAOption
interface MFAOption {}property AttributeName
AttributeName: string;property DeliveryMedium
DeliveryMedium: 'SMS' | 'EMAIL';interface UserData
interface UserData {}property MFAOptions
MFAOptions: MFAOption[];property PreferredMfaSetting
PreferredMfaSetting: string;property UserAttributes
UserAttributes: ICognitoUserAttributeData[];property UserMFASettingList
UserMFASettingList: string[];property Username
Username: string;type ChallengeName
type ChallengeName = | 'CUSTOM_CHALLENGE' | 'MFA_SETUP' | 'NEW_PASSWORD_REQUIRED' | 'SELECT_MFA_TYPE' | 'SMS_MFA' | 'SOFTWARE_TOKEN_MFA';type ClientMetadata
type ClientMetadata = { [key: string]: string } | undefined;type NodeCallback
type NodeCallback<E, T> = (err?: E, result?: T) => void;type UpdateAttributesNodeCallback
type UpdateAttributesNodeCallback<E, T, K> = ( err?: E, result?: T, details?: K) => void;namespace amazon-cognito-identity-js.NodeCallback
namespace amazon-cognito-identity-js.NodeCallback {}type Any
type Any = NodeCallback<Error | undefined, any>;Package Files (1)
Dependencies (5)
Dev Dependencies (6)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/amazon-cognito-identity-js.
- Markdown[](https://www.jsdocs.io/package/amazon-cognito-identity-js)
- HTML<a href="https://www.jsdocs.io/package/amazon-cognito-identity-js"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3682 ms. - Missing or incorrect documentation? Open an issue for this package.
