-
Notifications
You must be signed in to change notification settings - Fork 59
Authentication Service
Wuyi Chen edited this page Jun 29, 2019
·
13 revisions
Issue and validate access tokens and manage clients and users.
- Spring Cloud Security
- OAuth2
- Spring Data JPA
- Netflix Eureka
- Netflix Hystrix
- Organization Service
- URL: http://localhost:8901/auth/oauth/token
- Method: GET
- Parameters
- Headers
-
Authentication
- Type: Basic Auth
- Credential
- Username: eagleeye
- Password: thisissecret
- Body
KEY | VALUE |
---|---|
grant_type | password |
scope | webclient |
username | john.carnell |
password | password1 |
- Notes
- URL: http://localhost:8901/auth/user
- Method: GET
- Parameters
- Headers
KEY | VALUE |
---|---|
Authorization | Bearer {access_token} |
- Body
- Notes
- URL: http://localhost:8901/auth/client/{clientId}
- Method: GET
-
Parameters
- clientId: The client ID for looking up.
- Headers
KEY | VALUE |
---|---|
Authorization | Bearer {access_token} |
- Body
- Notes
- URL: http://localhost:8901/auth/client
- Method: PUT
- Parameters
- Headers
KEY | VALUE |
---|---|
Authorization | Bearer {access_token} |
Content-Type | application/json |
- Body
{
"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"
}
- Notes
- URL: http://localhost:8901/auth/client
- Method: POST
- Parameters
- Headers
KEY | VALUE |
---|---|
Authorization | Bearer {access_token} |
Content-Type | application/json |
- Body
{
"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"
}
- Notes
- URL: http://localhost:8901/auth/client/{clientId}
- Method: DELETE
-
Parameters
- clientId: The client ID for identifying the record needs to be deleted.
- Headers
KEY | VALUE |
---|---|
Authorization | Bearer {access_token} |
- Body
- Notes
- URL: http://localhost:8901/auth/user/{username}
- Method: GET
-
Parameters
- username: The username for looking up.
- Headers
KEY | VALUE |
---|---|
Authorization | Bearer {access_token} |
- Body
- Notes
- URL: http://localhost:8901/auth/user
- Method: PUT
- Parameters
- Headers
KEY | VALUE |
---|---|
Authorization | Bearer {access_token} |
Content-Type | application/json |
- Body
{
"username": "mary.dawson",
"password": "password3",
"enabled": true,
"authoritiesList": [
{
"username": "mary.dawson",
"authority": "USER"
}
]
}
- Notes
- URL: http://localhost:8901/auth/user
- Method: POST
- Parameters
- Headers
KEY | VALUE |
---|---|
Authorization | Bearer {access_token} |
Content-Type | application/json |
- Body
{
"username": "mary.dawson",
"password": "password3",
"enabled": true,
"authoritiesList": [
{
"username": "mary.dawson",
"authority": "USER"
}
]
}
- Notes
- URL: http://localhost:8901/auth/user/{username}
- Method: DELETE
-
Parameters
- username: The username for identifying the record needs to be deleted.
- Headers
KEY | VALUE |
---|---|
Authorization | Bearer {access_token} |
- Body
- Notes
- oauth_client_details
- users
- authorities
- user_orgs
- Overview
- Getting Started
-
Technical Essentials
- Autowired
- SpringData JPA
- Configuration File Auto-loading
- Configuration Encryption
- Service Discovery with Eureka
- Resiliency Patterns with Hystrix
- Configure Hystrix
- Service Gateway with Zuul
- Zuul Filters
- Protect Service with Spring Security and OAuth2
- Use JWT as Access Token
- Store Clients and Users' Credentials to DB
- Integrate with Message Queue (Kafka)
- Integrate with Redis
- Tune Logging
- Log Aggregation
- Send Trace to Zipkin
- Build Runnable Jar
- Core Application Logic
- Components