Constructor
new UsersUAA(endPointopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
endPoint |
String |
<optional> |
UAA endpoint URL |
- Source:
Methods
add(uaaOptions) → {Promise}
Add a User on UAA (SCIM)
Parameters:
| Name | Type | Description |
|---|---|---|
uaaOptions |
Object | User creation options |
- Source:
Returns:
- Type
- Promise
decodeToken(token) → {Object}
Decode a JWT token locally (no server validation, no signature verification).
Parameters:
| Name | Type | Description |
|---|---|---|
token |
String | JWT access token |
- Source:
Throws:
-
If token is invalid
- Type
- Error
Returns:
Decoded payload
- Type
- Object
getTokenInfo(token, clientId, clientSecret) → {Promise}
Get token information from UAA /check_token endpoint.
Parameters:
| Name | Type | Description |
|---|---|---|
token |
String | Access token to check |
clientId |
String | |
clientSecret |
String |
- Source:
Returns:
- Type
- Promise
getUsers(searchOptionsopt) → {Promise}
Get users (SCIM)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
searchOptions |
String |
<optional> |
Query string (e.g. '?filter=userName eq "demo4"') |
- Source:
Returns:
- Type
- Promise
login(username, password) → {Promise}
Authenticate with password grant type
Parameters:
| Name | Type | Description |
|---|---|---|
username |
String | |
password |
String |
- Source:
Returns:
UAA token response
- Type
- Promise
loginWithApiKey(apiKey) → {Promise}
Authenticate using an API key (Bearer token).
For SAP BTP and other platforms that support API key authentication.
Parameters:
| Name | Type | Description |
|---|---|---|
apiKey |
String | The API key/token for authentication |
- Source:
Returns:
Resolves with the authenticated token
- Type
- Promise
loginWithAuthorizationCode(code, clientId, clientSecret, redirectUri) → {Promise}
Exchange an authorization code for a token (OAuth2 code flow).
Parameters:
| Name | Type | Description |
|---|---|---|
code |
String | |
clientId |
String | |
clientSecret |
String | |
redirectUri |
String |
- Source:
Returns:
- Type
- Promise
loginWithClientCredentials(clientId, clientSecret) → {Promise}
Authenticate using client_credentials grant type (service-to-service).
Parameters:
| Name | Type | Description |
|---|---|---|
clientId |
String | |
clientSecret |
String |
- Source:
Returns:
- Type
- Promise
loginWithPasscode(passcode) → {Promise}
Authenticate using a one-time passcode (SSO).
Parameters:
| Name | Type | Description |
|---|---|---|
passcode |
String |
- Source:
Returns:
- Type
- Promise
refreshToken() → {Promise}
Refresh an OAuth token
- Source:
Returns:
UAA token response
- Type
- Promise
remove(uaaGuid) → {Promise}
Remove a User
Parameters:
| Name | Type | Description |
|---|---|---|
uaaGuid |
String | User GUID |
- Source:
Returns:
- Type
- Promise
updatePassword(uaaGuid, uaaOptions) → {Promise}
Update user password
Parameters:
| Name | Type | Description |
|---|---|---|
uaaGuid |
String | User GUID |
uaaOptions |
Object | Password update options |
- Source:
Returns:
- Type
- Promise