@@ -7,7 +7,8 @@ Project contains following components and layers
7
7
2) Authorization:
8
8
2.1) Internal basic authorization
9
9
2.2) OAuth2 with internal authorization server
10
- 2.3) OAuth2 with OpenAm authorization server
10
+ 2.3) OAuth2 with KeyCloak (\src\main\resources\application.yml) and
11
+ OpenAm (src\main\resources\configsBackups\OpenAm_Application) authorization server
11
12
############################################################################################################################################
12
13
########################################################## OAUTH2 TERMS ####################################################################
13
14
Resource Owner � an entity that is able to grant access to its protected resources
@@ -16,7 +17,7 @@ Resource Server
16
17
Client � an entity that is capable of obtaining access tokens from authorization servers
17
18
18
19
Spring:
19
- @EnableResourceServer configures component as entity that can obtain access_token (in my final case it External Identity Server = OpenAm)
20
+ @EnableResourceServer configures component as entity that can obtain access_token (in my final case it External Identity Server = KeyCloak or OpenAm)
20
21
@EnableOAuth2Sso makes application an OAuth2 client
21
22
############################################################################################################################################
22
23
#################################################### INTERNAL OAUTH2 SECTION ###############################################################
@@ -147,7 +148,23 @@ You'll receive following JSON on userInfo request:
147
148
###########################################################################################################################################
148
149
####################################################### KEY CLOAK #########################################################################
149
150
My KeyCloak server is running on http://127.0.0.1:8890/, realm is master
150
- it is possible to see endpoints
151
+ it is possible to see endpoints here
152
+
153
+ Token generation Endpoint is: http://127.0.0.1:8890/auth/realms/master/protocol/openid-connect/token
154
+ we like for openAm sending data through body as x-www-form-urlencoded and we sending
155
+ (client_id, client_secret, grant_type, username, password and scope)
156
+
157
+ UserInfo endpoint is - http://127.0.0.1:8890/auth/realms/master/protocol/openid-connect/userinfo
158
+ UserInfo data is:
159
+ {
160
+ "sub": "d2f8b2b7-baab-42df-9567-cc2871dc1ff8",
161
+ "email_verified": false,
162
+ "user_name": "m_ushakov",
163
+ "name": "Mikhail Ushakov",
164
+ "preferred_username": "m_ushakov",
165
+ "given_name": "Mikhail",
166
+ "family_name": "Ushakov"
167
+ }
151
168
###########################################################################################################################################
152
169
############################################################## RESOURCES ##################################################################
153
170
OAuth protocol description: https://tools.ietf.org/html/rfc6749#section-3
0 commit comments