mirror of
https://github.com/keycloak/keycloak.git
synced 2026-05-24 10:48:52 -05:00
Retrieve ClientConnection by invoking getConnection() instead of getContextObject()
Closes #25231
(cherry picked from commit 0e535d2bbe)
Signed-off-by: Fouad Almalki <me@fouad.io>
Co-authored-by: Fouad Almalki <me@fouad.io>
This commit is contained in:
+1
-1
@@ -67,7 +67,7 @@ public abstract class AbstractCibaEndpoint {
|
||||
}
|
||||
|
||||
protected void checkSsl() {
|
||||
ClientConnection clientConnection = session.getContext().getContextObject(ClientConnection.class);
|
||||
ClientConnection clientConnection = session.getContext().getConnection();
|
||||
RealmModel realm = session.getContext().getRealm();
|
||||
|
||||
if (!session.getContext().getUri().getBaseUri().getScheme().equals("https") && realm.getSslRequired().isRequired(clientConnection)) {
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public abstract class AbstractParEndpoint {
|
||||
}
|
||||
|
||||
protected void checkSsl() {
|
||||
ClientConnection clientConnection = session.getContext().getContextObject(ClientConnection.class);
|
||||
ClientConnection clientConnection = session.getContext().getConnection();
|
||||
|
||||
if (!session.getContext().getUri().getBaseUri().getScheme().equals("https") && realm.getSslRequired().isRequired(clientConnection)) {
|
||||
throw new CorsErrorResponseException(cors.allowAllOrigins(), OAuthErrorException.INVALID_REQUEST, "HTTPS required", Response.Status.FORBIDDEN);
|
||||
|
||||
Reference in New Issue
Block a user