Retrieve ClientConnection by invoking getConnection() instead of getContextObject()
Signed-off-by: Fouad Almalki <me@fouad.io>
This commit is contained in:
parent
c3bc43aa86
commit
0e535d2bbe
2 changed files with 2 additions and 2 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue