Description
Issue and validate access tokens and manage clients and users.
Technique
- Spring Cloud Security
- OAuth2
- Spring Data JPA
- Netflix Eureka
- Netflix Hystrix
Services/Servers protected by Autentication service:
Available API Calls
AS1: Get an access token (by the client credential and the user credential).
KEY |
VALUE |
grant_type |
password |
scope |
webclient |
username |
john.carnell |
password |
password1 |
AS2: Retrieve the user information.
KEY |
VALUE |
Authorization |
Bearer {access_token} |
AS3: Get a client record by client ID.
KEY |
VALUE |
Authorization |
Bearer {access_token} |
AS4: Update a client record.
KEY |
VALUE |
Authorization |
Bearer {access_token} |
Content-Type |
application/json |
{
"clientId": "eagleeye",
"resourceIds": null,
"clientSecret": "123456cs",
"scope": "webclient,mobileclient",
"authorizedGrantTypes": "refresh_token,password,client_credentials",
"webServerRedirectUri": null,
"authorities": null,
"accessTokenValidity": 36000,
"refreshTokenValidity": 36000,
"additionalInformation": null,
"autoapprove": "1"
}
AS5: Add a new client record.
KEY |
VALUE |
Authorization |
Bearer {access_token} |
Content-Type |
application/json |
{
"clientId": "eagleeye",
"resourceIds": null,
"clientSecret": "123456cs",
"scope": "webclient,mobileclient",
"authorizedGrantTypes": "refresh_token,password,client_credentials",
"webServerRedirectUri": null,
"authorities": null,
"accessTokenValidity": 36000,
"refreshTokenValidity": 36000,
"additionalInformation": null,
"autoapprove": "1"
}
AS6: Delete a client record by client ID.
KEY |
VALUE |
Authorization |
Bearer {access_token} |
AS7: Get a user record with authorities by username.
KEY |
VALUE |
Authorization |
Bearer {access_token} |
AS8: Update a new user record with authorities.
KEY |
VALUE |
Authorization |
Bearer {access_token} |
Content-Type |
application/json |
{
"username": "mary.dawson",
"password": "password3",
"enabled": true,
"authoritiesList": [
{
"username": "mary.dawson",
"authority": "USER"
}
]
}
AS9: Add a new user record with authorities.
KEY |
VALUE |
Authorization |
Bearer {access_token} |
Content-Type |
application/json |
{
"username": "mary.dawson",
"password": "password3",
"enabled": true,
"authoritiesList": [
{
"username": "mary.dawson",
"authority": "USER"
}
]
}
AS10: Delete a user record with authorities by username.
KEY |
VALUE |
Authorization |
Bearer {access_token} |
Database Table(s)
- oauth_client_details
- users
- authorities
- user_orgs