KEYCLOAK-1733 added verifySSL checks for 'basic' and 'query' authentication
This commit is contained in:
parent
e03bf6eef6
commit
7571dc07f9
2 changed files with 3 additions and 1 deletions
|
@ -85,6 +85,7 @@ public abstract class RequestAuthenticator {
|
|||
log.debug("QueryParamAuth auth FAILED");
|
||||
return AuthOutcome.FAILED;
|
||||
} else if (outcome == AuthOutcome.AUTHENTICATED) {
|
||||
if (verifySSL()) return AuthOutcome.FAILED;
|
||||
log.debug("QueryParamAuth AUTHENTICATED");
|
||||
completeAuthentication(queryParamAuth, "KEYCLOAK");
|
||||
return AuthOutcome.AUTHENTICATED;
|
||||
|
@ -102,6 +103,7 @@ public abstract class RequestAuthenticator {
|
|||
log.debug("BasicAuth FAILED");
|
||||
return AuthOutcome.FAILED;
|
||||
} else if (outcome == AuthOutcome.AUTHENTICATED) {
|
||||
if (verifySSL()) return AuthOutcome.FAILED;
|
||||
log.debug("BasicAuth AUTHENTICATED");
|
||||
completeAuthentication(basicAuth, "BASIC");
|
||||
return AuthOutcome.AUTHENTICATED;
|
||||
|
|
|
@ -22,7 +22,7 @@ Step 2: Deploy and run the example
|
|||
|
||||
curl http://admin:password@localhost:8080/basicauth/service/echo?value=hello
|
||||
|
||||
(If we navigate directly to http://localhost:8080/basicauth/service/echo?value=hello, we get "Client is not allowed to initiate browser login with given response_type. Standard flow is disabled for the client.").
|
||||
(If we navigate directly to http://localhost:8080/basicauth/service/echo?value=hello, we get an error in the browser because the request is not authenticated).
|
||||
|
||||
This should result in the value 'hello' being returned as a response.
|
||||
|
||||
|
|
Loading…
Reference in a new issue