Merge pull request #3831 from Hitachi/master

KEYCLOAK-2604 Proof Key for Code Exchange by OAuth Public Clients
This commit is contained in:
Bill Burke authored and GitHub committed 2017-04-06 15:36:08 -04:00
commit 3ce0c57e17
16 files changed
+978 -2

No files matched your search

@@ -83,6 +83,14 @@ public interface OAuth2Constants {
String JWT = "JWT";
// https://tools.ietf.org/html/rfc7636#section-6.1
String CODE_VERIFIER = "code_verifier";
String CODE_CHALLENGE = "code_challenge";
String CODE_CHALLENGE_METHOD = "code_challenge_method";
// https://tools.ietf.org/html/rfc7636#section-6.2.2
String PKCE_METHOD_PLAIN = "plain";
String PKCE_METHOD_S256 = "S256";
}
@@ -78,6 +78,9 @@ public class AdapterConfig extends BaseAdapterConfig implements AdapterHttpClien
protected int publicKeyCacheTtl = 86400; // 1 day
@JsonProperty("policy-enforcer")
protected PolicyEnforcerConfig policyEnforcerConfig;
// https://tools.ietf.org/html/rfc7636
@JsonProperty("enable-pkce")
protected boolean pkce = false;
/**
* The Proxy url to use for requests to the auth-server, configurable via the adapter config property {@code proxy-url}.
@@ -244,4 +247,14 @@ public class AdapterConfig extends BaseAdapterConfig implements AdapterHttpClien
public void setPublicKeyCacheTtl(int publicKeyCacheTtl) {
this.publicKeyCacheTtl = publicKeyCacheTtl;
}
// https://tools.ietf.org/html/rfc7636
public boolean isPkce() {
return pkce;
}
public void setPkce(boolean pkce) {
this.pkce = pkce;
}
}