Skip to content

Commit

Permalink
readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilLord666 committed Oct 16, 2019
1 parent 5b6782f commit 18b68be
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
36 changes: 17 additions & 19 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,32 +58,30 @@ OpenAM provides the following three OAuth 2.0 endpoints with the last one, token
My OpenAM was deployed on localhost:8899 at context path /OpenAM-14.4.2
Therefore OpenAm base address is: http://localhost:8899/OpenAM-14.4.2

Authorize endpoint: http://localhost:8899/OpenAM-14.4.2/oauth2/authorize?realm=/abcdemo
Authorize endpoint: HTTP POST http://localhost:8899/OpenAM-14.4.2/oauth2/authorize?realm=/abcdemo (using for SSO)

First step is to get access token (Realm is abcdemo)

HTTP POST http://localhost:8899/OpenAM-14.4.2/oauth2/access_token?realm=/abcdemo

First step is to get access token
You'll receive following json:

http://localhost:8899/OpenAM-14.4.2/oauth2/realms/simplest/access_token


/oauth2/authorize
Authorization endpoint defined in RFC 6749, used to obtain an authorization grant from the resource owner

Example: https://openam.example.com:8443/openam/oauth2/authorize

/oauth2/access_token
Token endpoint defined in RFC 6749, used to obtain an access token from the authorization server

Example: https://openam.example.com:8443/openam/oauth2/access_token
{
"access_token": "e8ec0e37-42d4-4df5-b2e5-bfbaefcf6374",
"refresh_token": "c1ebed79-731e-4ab8-9f03-a8f3ab222e29",
"scope": "local",
"token_type": "Bearer",
"expires_in": 3599
}

/oauth2/tokeninfo
Endpoint not defined in RFC 6749, used to validate tokens, and to retrieve information such as scopes
For other operation you should use received OAuth2 token as Bearer %token%

Given an access token, a resource server can perform an HTTP GET on /oauth2/tokeninfo?access_token=token-id to retrieve a
JSON object indicating token_type, expires_in, scope, and the access_token ID.
HTTP GET http://localhost:8899/OpenAM-14.4.2/oauth2/userinfo?realm=/abcdemo

Example: https://openam.example.com:8443/openam/oauth2/tokeninfo
You'll receive following JSON on userInfo request:
{
"sub": "mjolnir"
}
###########################################################################################################################################
############################################################## RESOURCES ##################################################################
OAuth protocol description: https://tools.ietf.org/html/rfc6749#section-3
Expand Down
1 change: 0 additions & 1 deletion src/main/java/ru/techdemo/ApplicationServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;


Expand Down

0 comments on commit 18b68be

Please sign in to comment.