Access token
An Access JWT is used for authentication and authorization:
- Authentication requires verifying the signature of the Access JWT. If the signature is valid, access to the requested API resource is granted.
- Authorization is done by looking up privileges within the scope attribute of the Access JWT. For this, you must first obtain the Access JWT and then enter it into the
Authorization
header of each API call. The value of theAuthorization
looks like this:Bearer eyJhbGciOiJSUzI1NiIs.....
Refresh Token
A Refresh token is a long-lived token that you use to request new Access tokens. Its expiration time is longer than that of an Access token.
Operation | HTTP Request | Resource Request | Description |
---|---|---|---|
getUserToken | POST /iam/tokens |
TokenRequest | Get/refresh a token |
invalidateToken | DELETE /iam/tokens/invalidate |
Invalidate a token | |
resetUsingDELETE | DELETE /iam/tokens/reset |
reset |
Nexway provides a POST getUserToken endpoint to get and refresh JWTs. You can get a token two different ways:
- By using realm name, client secret, and by specifying the grant type in client_credentials, if using an application interface.
- By using realm name, username, password, and by specifying the grant type in password, if you are a human user.
Grant type "client_credentials" sample request
{
"clientSecret": "XXX-XXX-XXX-XXX",
"realmName": "com2us",
"grantType": "client_credentials"
}
Grant type "password" sample request
In this case, "grantType" is not mandatory, since the default value is "password".
{
"username": "jdoe",
"password": "987654321",
"realmName": "com2us"
}
Sample response
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJzUlFuM0J4ZnRDakd0dTVBR0lEZkIyQ0pnQVprMnpwN1R2UGppc2JSN3NJIn0.eyJqdGkiOiI0NzU5NzIwZi04NWRmLTQ1MWYtOTY2MS1jMDc5MGI5OWVmY2UiLCJleHAiOjE1MDY1ODczMTUsIm5iZiI6MCwiaWF0IjoxNTA2NTg3MDE1LCJpc3MiOiJodHRwOi8va2V5Y2xvYWs6ODA4MC9hdXRoL3JlYWxtcy9jb20ydXMiLCJhdWQiOiJuZXh3YXktY2VudGVyIiwic3ViIjoiMjhlNDU4MjYtNDlhYy00N2FmLWFkMTMtZmI5NjUyNGRiYWE5IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoibmV4d2F5LWNlbnRlciIsImF1d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LCJpc3MiOiJodHRwOi8va2V5Y2xvYWs6ODA4MC9hdXRoL3JlYWxtcy9jb20ydXMiLCJhdWQiOiJuZXh3YXktY2VudGVyIiwic3ViIjoiMjhlNDU4MjYtNDlhYy00N2FmLWFkMTMtZmI5NjUyNGRiYWE5IiwidHlwIjoiSUQiLCJhenAiOiJuZXh3YXktY2VudGVyIiwiYXV0aF90aW1lIjowLCJzZXNzaW9uX3N0YXRlIjoiODJiNzcxNzktOTBlYi00MTBhLWEwZjQtYWIzODk0NDVkNGZhIiwiYWNyIjoiMSIsIm5hbWUiOiJqb2huIGRvZSIsInByZWZlcnJlZF91c2VybmFtZSI6Impkb2UiLCJnaXZlbl9uYW1lIjoiam9obiIsImZhbWlseV9uYW1lIjoiZG9lIiwiZW1haWwiOiJqZG9lQGNvbTJ1cy5jb20ifQ.KuDQT7Rawksp8XrQLIAwxr6kzM0jfGmV0pH2P2DOob9hXqeXmYzJlKD0OwuNsLLKocBcenCIar-pAbq-2qhOBaEaozUXGHj8nSOjERXVMx4C1XwjsXJYy7g5JQ8aCeCubfA2hoyYSzPPqubbywAZxC5S2Nmj49TKXpP_QmnvC6Od0cOX1OzXQOA4CvBCQ1cSTQQtGoLrQa6F9t8Um-qJbfhCIJf_6CbnTas48l7ipgOpk2y6QtMP9K_dd-sjJrH5YCW2R8CGVyeImldqVydyRZZ6urZbDrPkL1l0U0VtYv_a_NsrbeP-RLKFdmUMca5qIrhrZh-bbztrUyyq-aoUwQ",
"not-before-policy": 0,
"session_state": "371a7b3b-6a24-479b-89ee-048e7da736b5"
}
Going forward, use a Refresh token to extend your session instead of using client secret to get a new Access token (and thus creating a new session) each time. However, as a Refresh token also has an expiration time, you will need use client secret when you request a new Refresh token.
Sample refresh request
{
"realmName": "com2us",
"grantType": "refresh_token",
"refreshToken": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJzUlFuM0J4ZnRDakd0dTVBR0lEZkIyQ0pnQVprMnpwN1R2UGppc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XX0sIm54LWxpY2Vuc2Uta2V5LXByb3ZpZGVyIjp7InJvbGVzIjpbInBvc3QiLCJnZXQiXX0sIm54LWNhbXBhaWduLWNvbmZpZ3VyYXRvciI6eyJyb2xlcyI6WyJwb3N0IiwiZ2V0IiwiZGVsZXRlIiwicHV0Il19LCJzdG9yZS1zZXJ2aWNlIjp7InJvbGVzIjpbInVwZGF0ZVN0b3JlIiwiZ2V0U3RvcmVCeU5hbWUiLCJwb3N0IiwiZ2V0IiwiZ2V0QWxsU3RvcmVzIiwiZ2V0cyIsImRlbGV0ZSIsImNyZWF0ZVN0b3JlIiwicHV0IiwiZGVsZXRlU3RvcmUiXX0sInB1cmNoYXNlLXNlcnZpY2UiOnsicm9sZXMiOlsicG9zdCJdfSwicGVudGFobyI6eyJyb2xlcyI6WyJnZXQiXX0sIm9yZGVyLXNlcnZpY2UiOnsicm9sZXMiOlsiZ2V0T3JkZXJFbWFpbCIsImdldE9yZGVyIiwiZ2V0QWxsT3JkZXJzIl19LCJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50Iiwidmlldy1wcm9maWxlIl19fX0.jUPnkNyaElkyNeVtcv6qapTk06-VDy2ddR04btCJBUhhQyl1KZY5fsSlRJXh3PZQcyU4_mSIZiIXMaFKH8WMOWbW6stnLSZMdPMLpwHIIlL14FOMifsz3nkacIk3L8ZIfZcXXn-jGNHJ0N_Toh15JTp_jbDfiaX-n7vNfurggQ8kHUrMXUDfXmB-vJbKgvc7uwKOLsopkVPXehq_FYMdst_oAqBWQzAFH1726S1XKINcluAtp_7ItYkNTZMgKH44vuBsu4EewvJE6hQw_TrzTSEz1ozDKbPQIrbbR0GI3Dz4cmZuHfMVE7-_6PPzrXRzT1eh31NZO8hjh-_ghzp6Vw"
}
create/refresh a token
Create or refresh a JWT token.
Authorizations:
header Parameters
X-Real-Ip | string |
Request Body schema: application/json
scope | string |
username | string |
password | string |
realmName | string |
clientId | string |
clientSecret | string |
grantType | string Enum: "password" "refresh_token" "client_credentials" "end_user_credentials" "google_login" |
refreshToken | string |
customerId | string |
storeId | string |
tokenId | string |
firstName | string |
lastName | string |
string | |
object (TokenProvider) | |
refresh_token | string |
realm | string |
client_id | string |
grant_type | string |
client_secret | string |
Responses
Request samples
- Payload
{- "scope": "string",
- "username": "string",
- "password": "string",
- "realmName": "string",
- "clientId": "string",
- "clientSecret": "string",
- "grantType": "password",
- "refreshToken": "string",
- "customerId": "string",
- "storeId": "string",
- "tokenId": "string",
- "firstName": "string",
- "lastName": "string",
- "email": "string",
- "provider": {
- "id": "string",
- "name": "string"
}, - "refresh_token": "string",
- "realm": "string",
- "client_id": "string",
- "grant_type": "string",
- "client_secret": "string"
}
Response samples
- 200
- 401
- 403
- 404
- 500
{- "access_token": "string",
- "expires_in": 0,
- "refresh_expires_in": 0,
- "refresh_token": "string",
- "token_type": "string",
- "id_token": "string",
- "not-before-policy": 0,
- "session_state": "string"
}
create/refresh a token
Create a JWT token or refresh a new one.
Authorizations:
query Parameters
client_id | string Client id |
client_secret | string Client secret |
username | string User name |
password | string Password |
refresh_token | string Refresh token |
grant_type | string Request type. Possible values are: password, refresh_token, client_credentials |
scope | string Scope |
realm | string Realm name |
header Parameters
X-Real-Ip | string |
authorization | string |
Authorization | string |
Request Body schema: application/jsonrequired
scope | string |
username | string |
password | string |
realmName | string |
clientId | string |
clientSecret | string |
grantType | string Enum: "password" "refresh_token" "client_credentials" "end_user_credentials" "google_login" |
refreshToken | string |
customerId | string |
storeId | string |
refresh_token | string |
realm | string |
client_id | string |
grant_type | string |
client_secret | string |
Responses
Request samples
- Payload
{- "scope": "string",
- "username": "string",
- "password": "string",
- "realmName": "string",
- "clientId": "string",
- "clientSecret": "string",
- "grantType": "password",
- "refreshToken": "string",
- "customerId": "string",
- "storeId": "string",
- "refresh_token": "string",
- "realm": "string",
- "client_id": "string",
- "grant_type": "string",
- "client_secret": "string"
}
Response samples
- 200
- 401
- 403
- 404
- 500
{- "access_token": "string",
- "expires_in": 0,
- "refresh_expires_in": 0,
- "refresh_token": "string",
- "token_type": "string",
- "id_token": "string",
- "not-before-policy": 0,
- "session_state": "string"
}