Get Authorization Token
POST/api/login
The Bearer Authentication scheme
is dedicated to the authentication using a token and is described by the [RFC6750]. Even if this scheme comes from an OAuth2 specification, you can still use it as a way to exchange between a client and a server.
The SSM API currently requires the HTTP authentication scheme Bearer
for authentication. All requests must have a valid Token
specified in the HTTP Authorization header with the Bearer
scheme.
A POST
request by passing 'username' and 'password' in json
text in the body
, will return a Token
in the response which can be passed in a header
variable for subsequent requests
Request
- application/json
Body
password string
username string
Responses
- 200
Get Token
Response Headers
Cache-Control
string
Content-Length
string
Date
string
Pragma
string
Server
string
X-Frame-Options
string
- application/json
- Schema
- Example (from schema)
- Get Token
Schema
access_token string
expires_in number
refresh_token string
roles string[]
token_type string
username string
{
"access_token": "*****",
"expires_in": 1800,
"refresh_token": "refreshTokenabcd*******",
"roles": [
"ROLE_ADMIN"
],
"token_type": "Bearer",
"username": "admin"
}
{
"access_token": "*****",
"expires_in": 1800,
"refresh_token": "refreshTokenabcd*******",
"roles": [
"ROLE_ADMIN"
],
"token_type": "Bearer",
"username": "admin"
}
Loading...