Class: AuthenticationClient
Remarks
Represents a collection of functions to interact with the Authentication API endpoints.
Constructors
new AuthenticationClient()
new AuthenticationClient(
optionalArgs
?):AuthenticationClient
optionalArgs?
sdkManager
SdkManager
Returns
Defined in
Methods
getKeys()
Operation: Get JWKS
getKeys(
optionalArgs
?):Promise
<Jwks
>
Returns a set of public keys in the JSON Web Key Set (JWKS) format.
Public keys returned by this operation can be used to validate the asymmetric JWT signature of an access token without making network calls. It can be used to validate both two-legged access tokens and three-legged access tokens.
See the Developer’s Guide topic on Asymmetric Signing for more information.
optionalArgs?
options
ApsServiceRequestConfig
Override http request option.
Returns
Promise
<Jwks
>
Throws
Defined in
getOidcSpec()
Operation: Get OIDC Specification
getOidcSpec(
optionalArgs
?):Promise
<OidcSpec
>
Returns an OpenID Connect Discovery Specification compliant JSON document. It contains a list of the OpenID/OAuth endpoints, supported scopes, claims, public keys used to sign the tokens, and other details.
optionalArgs?
options
ApsServiceRequestConfig
Override http request option.
Returns
Promise
<OidcSpec
>
Throws
Defined in
getThreeLeggedToken()
Operation: Get Three Legged Token
getThreeLeggedToken(
clientId
,code
,redirect_uri
,optionalArgs
?):Promise
<ThreeLeggedToken
>
Returns a 3-legged access token. This operation has a rate limit of 500 calls per minute.
Parameters
clientId
string
The Client ID of the calling application, as registered with APS.
code
string
The authorization code that was passed to your application when the user granted access permission to your application. It was passed as the code
parameter to the redirect URI when you called Authorize User.
redirect_uri
string
The URI that APS redirects users to after they grant or deny access permission to the application. Must match the Callback URL for the application registered with APS.
optionalArgs?
clientSecret
string
The Client secret of the calling application, as registered with APS.Note The clientSecret is required only for Traditional Web Apps and Server-to-Server Apps. It is not required for Desktop, Mobile, and Single-Page Apps.
code_verifier
string
A random URL-encoded string between 43 characters and 128 characters. In a PKCE grant flow, the authentication server uses this string to verify the code challenge that was passed when you called Authorize User. Required if [code_challenge
was specified when you called Authorize User.
options
ApsServiceRequestConfig
Override http request option.
Returns
Promise
<ThreeLeggedToken
>
Throws
Defined in
getTwoLeggedToken()
Operation: Get Two Legged Token
getTwoLeggedToken(
clientId
,clientSecret
,scopes
,optionalArgs
?):Promise
<TwoLeggedToken
>
Returns a 2-legged access token. This operation has a rate limit of 500 calls per minute.
Parameters
clientId
string
The Client ID of the calling application, as registered with APS.
clientSecret
string
The Client secret of the calling application, as registered with APS.
scopes
Scopes
[]
A list of requested scopes. See the Developer’s Guide documentation on scopes for a list of valid values you can provide.
optionalArgs?
options
ApsServiceRequestConfig
Override http request option.
Returns
Promise
<TwoLeggedToken
>
Throws
Defined in
getUserInfo()
Operation: > getUserInfo(authorization
, optionalArgs
?): Promise
<UserInfo
>
Retrieves information about the authenticated user.
Parameters
optionalArgs?
options
ApsServiceRequestConfig
Override http request option.
Returns
Promise
<UserInfo
>
Defined in
introspectToken()
Operation: Introspect Token
introspectToken(
token
?,clientId
?,optionalArgs
?):Promise
<IntrospectToken
>
Returns metadata about the specified access token or reference token.
An application can only introspect its own tokens.
This operation has a rate limit of 500 calls per minute.
Parameters
token?
string
The token to be introspected.
clientId?
string
The Client ID of the application making the request. Note This is required only for Traditional Web Apps and Server-to-Server Apps. It is not required for Desktop, Mobile, and Single-Page Apps.
optionalArgs?
clientSecret
string
options
ApsServiceRequestConfig
Override http request option.
Returns
Promise
<IntrospectToken
>
Throws
Defined in
logout()
Operation: Logout
logout(
optionalArgs
?):string
Signs out the currently authenticated user from the APS authorization server. Thereafter, this operation redirects the user to the post_logout_redirect_uri
, or to the Autodesk Sign-in page when no post_logout_redirect_uri
is provided.
This operation has a rate limit of 500 calls per minute.
optionalArgs?
postLogoutRedirectUri
string
Returns
string
Throws
Defined in
refreshToken()
Operation: Get Refresh Token
refreshToken(
refreshToken
,clientId
,optionalArgs
?):Promise
<ThreeLeggedToken
>
Returns a new 3-legged access token using the refresh token provided in the request. This operation has a rate limit of 500 calls per minute.
Parameters
refreshToken
string
The refresh token used to acquire a new access token and a refresh token.
clientId
string
The authorization code that was passed to your application when the user granted access permission to your application. It was passed as the code
parameter to the redirect URI when you called Authorize User.
optionalArgs?
clientSecret
string
The Client secret of the calling application, as registered with APS.Note The clientSecret is required only for Traditional Web Apps and Server-to-Server Apps. It is not required for Desktop, Mobile, and Single-Page Apps.
options
ApsServiceRequestConfig
Override http request option.
scopes
Scopes
[]
A list of requested scopes. See the Developer’s Guide documentation on scopes for a list of valid values you can provide.
Returns
Promise
<ThreeLeggedToken
>
Throws
Defined in
revoke()
Operation: Revoke Token
revoke(
token
,clientId
?,tokenTypeHint
?,optionalArgs
?):Promise
<ApiResponse
>
Revokes an active access token or refresh token.
An application can only revoke its own tokens.
This operation has a rate limit of 100 calls per minute.
Parameters
token
string
The token to be revoked.
clientId?
string
The Client ID of the application making the request. Note This is required only for Traditional Web Apps and Server-to-Server Apps. It is not required for Desktop, Mobile, and Single-Page Apps.
tokenTypeHint?
optionalArgs?
clientSecret
string
options
ApsServiceRequestConfig
Override http request option.
Returns
Promise
<ApiResponse
>