@@ -7,7 +7,8 @@ Project contains following components and layers
77 2) Authorization:
88 2.1) Internal basic authorization
99 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
1112############################################################################################################################################
1213########################################################## OAUTH2 TERMS ####################################################################
1314Resource Owner � an entity that is able to grant access to its protected resources
@@ -16,7 +17,7 @@ Resource Server
1617Client � an entity that is capable of obtaining access tokens from authorization servers
1718
1819Spring:
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)
2021@EnableOAuth2Sso makes application an OAuth2 client
2122############################################################################################################################################
2223#################################################### INTERNAL OAUTH2 SECTION ###############################################################
@@ -147,7 +148,23 @@ You'll receive following JSON on userInfo request:
147148###########################################################################################################################################
148149####################################################### KEY CLOAK #########################################################################
149150My 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+ }
151168###########################################################################################################################################
152169############################################################## RESOURCES ##################################################################
153170OAuth protocol description: https://tools.ietf.org/html/rfc6749#section-3
0 commit comments