check ssl required in adapter

This commit is contained in:
Bill Burke committed 2014-05-14 15:23:45 -04:00
1 parent 26f6da10dd
commit 07dbb7d7b7
2 files changed
+6

No files matched your search

@@ -32,6 +32,10 @@ public abstract class RequestAuthenticator {
public AuthOutcome authenticate() {
log.info("--> authenticate()");
if (!facade.getRequest().isSecure() && deployment.isSslRequired()) {
log.warn("SSL is required to authenticate");
return AuthOutcome.FAILED;
}
BearerTokenRequestAuthenticator bearer = createBearerTokenAuthenticator();
log.info("try bearer");
AuthOutcome outcome = bearer.authenticate(facade);
@@ -65,6 +69,7 @@ public abstract class RequestAuthenticator {
return AuthOutcome.NOT_ATTEMPTED;
}
completeAuthentication(oauth);
// redirect to strip out access code and state query parameters