Reference Guide
TypeScript SDK Reference
Resource Information
Package Name: | @aps_sdk/authentication |
Version: | 1.0.0 |
Installing this Library
npm i @aps_sdk/authentication
Learning Resources
Source Code
The source code for this library is available at https://github.com/autodesk-platform-services/aps-sdk-node.
Tutorials
The Authentication lesson in the Simple Viewer tutorial demonstrates how to use this library to obtain an Access Token.
Code Sample
import { AuthenticationClient, Scopes } from '@aps_sdk/authentication';
const clientId = '...';
const clientSecret = '...';
const authenticationClient = new AuthenticationClient();
const credentials = await authenticationClient.getTwoLeggedToken(
clientId,
clientSecret,
[Scopes.DataRead, Scopes.DataCreate, Scopes.BucketCreate]
);
console.log(credentials.access_token);
Show More
See https://github.com/autodesk-platform-services/aps-sdk-node/blob/main/samples/ for more code samples that use this SDK.
SDK to REST API Cross Reference
Operation Category | Operation | Method | HTTP Request |
---|---|---|---|
Token | Get OIDC Specification | getOidcSpec | GET /.well-known/openid-configuration |
Authorize User | authorize | GET /authorize | |
Get JWKS | getKeys | GET /keys | |
Logout | logout | GET /logout | |
Get Refresh Token | refreshToken | ||
Get Three Legged Token | getThreeLeggedToken | ||
Get Two Legged Token | getTwoLeggedToken | ||
Introspect Token | introspectToken | GET /introspect | |
Revoke Token | revoke | POST /revoke | |
Users | Get User Info | getUserInfo | GET /userinfo |