Multi oauth2 clients - 1 fixed per session #190
-
Hi, rather than give usesr the option to logon to any of the configured oauth2 clients, I would like to dynamically fix them to just one, based on various conditions like entry url, http session data, lets say an oauth2 client resolver. Is there a good example of how to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
If your intention is to shrink the number of login options to 1 so that the login screen redirects immediately instead of displaying choices, you can have a look at the LoginController from the If you want to limit the number of possible sessions for a user (a user could still call another of the authorization-code initiation endpoint directly, without using the login screen) you'll have to look into
|
Beta Was this translation helpful? Give feedback.
-
@veganchamp would you please mark the thread as answered if you got enough info? |
Beta Was this translation helpful? Give feedback.
If your intention is to shrink the number of login options to 1 so that the login screen redirects immediately instead of displaying choices, you can have a look at the LoginController from the
resource-server_with_ui
tutorial.If you want to limit the number of possible sessions for a user (a user could still call another of the authorization-code initiation endpoint directly, without using the login screen) you'll have to look into
http.sessionManagement(sm -> {...})
. Be aware that:spring-add…