Skip to content

Commit 18b68be

Browse files
committed
readme updated
1 parent 5b6782f commit 18b68be

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed

readme.txt

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,32 +58,30 @@ OpenAM provides the following three OAuth 2.0 endpoints with the last one, token
5858
My OpenAM was deployed on localhost:8899 at context path /OpenAM-14.4.2
5959
Therefore OpenAm base address is: http://localhost:8899/OpenAM-14.4.2
6060

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

63+
First step is to get access token (Realm is abcdemo)
6364

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

65-
First step is to get access token
67+
You'll receive following json:
6668

67-
http://localhost:8899/OpenAM-14.4.2/oauth2/realms/simplest/access_token
68-
69-
70-
/oauth2/authorize
71-
Authorization endpoint defined in RFC 6749, used to obtain an authorization grant from the resource owner
72-
73-
Example: https://openam.example.com:8443/openam/oauth2/authorize
74-
75-
/oauth2/access_token
76-
Token endpoint defined in RFC 6749, used to obtain an access token from the authorization server
77-
78-
Example: https://openam.example.com:8443/openam/oauth2/access_token
69+
{
70+
"access_token": "e8ec0e37-42d4-4df5-b2e5-bfbaefcf6374",
71+
"refresh_token": "c1ebed79-731e-4ab8-9f03-a8f3ab222e29",
72+
"scope": "local",
73+
"token_type": "Bearer",
74+
"expires_in": 3599
75+
}
7976

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

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

86-
Example: https://openam.example.com:8443/openam/oauth2/tokeninfo
81+
You'll receive following JSON on userInfo request:
82+
{
83+
"sub": "mjolnir"
84+
}
8785
###########################################################################################################################################
8886
############################################################## RESOURCES ##################################################################
8987
OAuth protocol description: https://tools.ietf.org/html/rfc6749#section-3

src/main/java/ru/techdemo/ApplicationServer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import org.springframework.boot.SpringApplication;
99
import org.springframework.boot.autoconfigure.SpringBootApplication;
10-
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
1110
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
1211

1312

0 commit comments

Comments
 (0)