Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response authorization code #85

Open
awsoremod opened this issue Dec 16, 2024 · 0 comments
Open

Response authorization code #85

awsoremod opened this issue Dec 16, 2024 · 0 comments

Comments

@awsoremod
Copy link
Contributor

Необходимо возвращать код авторизации при получении запроса по адресу - http://localhost:8080/realms/master/login-actions/authenticate.
Входные параметры:

  • session_code - parameter that saves the state of the authentication process. It is not necessary to implement within the task.
  • execution - I don't know what it is. As part of another task.
  • client_id - previous client_id
  • tab_id - A query parameter that specifies how sessions are handled in the background. Implement as part of another task.
  • client_data - TODO need to find out what is being transmitted here and in what format. I haven't found any information. I assume encrypted pair of user login and password.

Необходимо вернуть:

  1. Код 302
  2. В header поместить:
Location: http://localhost:8080/test-callback?state=state_value&session_state=9a2c6510-33c8-415e-bc98-ee09b1bdfda4&iss=http%3A%2F%2Flocalhost%3A8080%2Frealms%2Fmaster&code=cb8cc342-5a03-4198-a501-5c52aacb7e3e.9a2c6510-33c8-415e-bc98-ee09b1bdfda4.295693c8-e13f-49e9-8f94-bcd1ad841963

Location должен содержать адрес коллбека с параметрами:

  • state
  • session_state
  • iss
  • code

Необходимо добавить логику при получение кода выдавать access token и т.д.

POST http://localhost:8080/realms/master/protocol/openid-connect/token
Authorization: Basic dGVzdDpVSmZGTVM3ejltd21rQXFBbXpsc2ZqMzh3RkdhdlNSVQ==

Request Body
grant_type: "authorization_code"
code: "cb8cc342-5a03-4198-a501-5c52aacb7e3e.9a2c6510-33c8-415e-bc98-ee09b1bdfda4.295693c8-e13f-49e9-8f94-bcd1ad841963"
redirect_uri: "http://localhost:8080/test-callback"

response:

{"access_token":"eyJ...g","expires_in":60,"refresh_expires_in":0,"refresh_token":"ey...Xg","token_type":"Bearer","not-before-policy":0,"session_state":"9a2c6510-33c8-415e-bc98-ee09b1bdfda4","scope":"email offline_access profile"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant