diff --git a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/AbstractOIDCAuthenticationFilter.java b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/AbstractOIDCAuthenticationFilter.java index d1a2d99ac..0afbc299d 100644 --- a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/AbstractOIDCAuthenticationFilter.java +++ b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/AbstractOIDCAuthenticationFilter.java @@ -288,7 +288,7 @@ public class AbstractOIDCAuthenticationFilter extends form.add("client_secret", serverConfig.getClientSecret()); if (debug) { - logger.debug("tokenEndpointURI = " + serverConfig.getTokenEndpointURI()); + logger.debug("tokenEndpointURI = " + serverConfig.getTokenEndpointUrl()); logger.debug("form = " + form); } @@ -296,7 +296,7 @@ public class AbstractOIDCAuthenticationFilter extends try { jsonString = restTemplate.postForObject( - serverConfig.getTokenEndpointURI(), form, String.class); + serverConfig.getTokenEndpointUrl(), form, String.class); } catch (HttpClientErrorException httpClientErrorException) { // Handle error @@ -489,7 +489,7 @@ public class AbstractOIDCAuthenticationFilter extends // TODO: display, prompt, request, request_uri - String authRequest = AbstractOIDCAuthenticationFilter.buildURL(serverConfiguration.getAuthorizationEndpointURI(), urlVariables); + String authRequest = AbstractOIDCAuthenticationFilter.buildURL(serverConfiguration.getAuthorizationEndpointUrl(), urlVariables); logger.debug("Auth Request: " + authRequest); diff --git a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/OIDCAuthenticationFilter.java b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/OIDCAuthenticationFilter.java index a039f686d..c621618d8 100644 --- a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/OIDCAuthenticationFilter.java +++ b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/OIDCAuthenticationFilter.java @@ -60,17 +60,13 @@ public class OIDCAuthenticationFilter extends AbstractOIDCAuthenticationFilter { // Validating configuration - Assert.notNull(oidcServerConfig.getAuthorizationEndpointURI(), - "An Authorization Endpoint URI must be supplied"); + Assert.notNull(oidcServerConfig.getAuthorizationEndpointUrl(), "An Authorization Endpoint URI must be supplied"); - Assert.notNull(oidcServerConfig.getTokenEndpointURI(), - "A Token ID Endpoint URI must be supplied"); + Assert.notNull(oidcServerConfig.getTokenEndpointUrl(), "A Token ID Endpoint URI must be supplied"); - Assert.notNull(oidcServerConfig.getClientId(), - "A Client ID must be supplied"); + Assert.notNull(oidcServerConfig.getClientId(), "A Client ID must be supplied"); - Assert.notNull(oidcServerConfig.getClientSecret(), - "A Client Secret must be supplied"); + Assert.notNull(oidcServerConfig.getClientSecret(), "A Client Secret must be supplied"); } /* @@ -110,10 +106,14 @@ public class OIDCAuthenticationFilter extends AbstractOIDCAuthenticationFilter { return null; } - public void setAuthorizationEndpointURI(String authorizationEndpointURI) { - oidcServerConfig.setAuthorizationEndpointURI(authorizationEndpointURI); + public void setAuthorizationEndpointUrl(String authorizationEndpointUrl) { + oidcServerConfig.setAuthorizationEndpointUrl(authorizationEndpointUrl); } + public void setTokenEndpointUrl(String tokenEndpointUrl) { + oidcServerConfig.setTokenEndpointUrl(tokenEndpointUrl); + } + public void setClientId(String clientId) { oidcServerConfig.setClientId(clientId); } @@ -122,10 +122,6 @@ public class OIDCAuthenticationFilter extends AbstractOIDCAuthenticationFilter { oidcServerConfig.setClientSecret(clientSecret); } - public void setTokenEndpointURI(String tokenEndpointURI) { - oidcServerConfig.setTokenEndpointURI(tokenEndpointURI); - } - public void setX509EncryptUrl(String x509EncryptUrl) { oidcServerConfig.setX509EncryptUrl(x509EncryptUrl); } diff --git a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/OIDCSignedRequestFilter.java b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/OIDCSignedRequestFilter.java index e8ee8e5ef..d78d9c2e3 100644 --- a/openid-connect-client/src/main/java/org/mitre/openid/connect/client/OIDCSignedRequestFilter.java +++ b/openid-connect-client/src/main/java/org/mitre/openid/connect/client/OIDCSignedRequestFilter.java @@ -40,10 +40,10 @@ public class OIDCSignedRequestFilter extends AbstractOIDCAuthenticationFilter { // Validating configuration - Assert.notNull(oidcServerConfig.getAuthorizationEndpointURI(), + Assert.notNull(oidcServerConfig.getAuthorizationEndpointUrl(), "An Authorization Endpoint URI must be supplied"); - Assert.notNull(oidcServerConfig.getTokenEndpointURI(), + Assert.notNull(oidcServerConfig.getTokenEndpointUrl(), "A Token ID Endpoint URI must be supplied"); Assert.notNull(oidcServerConfig.getClientId(), @@ -93,7 +93,7 @@ public class OIDCSignedRequestFilter extends AbstractOIDCAuthenticationFilter { urlVariables.put("request", jwt.toString()); - String authRequest = AbstractOIDCAuthenticationFilter.buildURL(serverConfiguration.getAuthorizationEndpointURI(), urlVariables); + String authRequest = AbstractOIDCAuthenticationFilter.buildURL(serverConfiguration.getAuthorizationEndpointUrl(), urlVariables); logger.debug("Auth Request: " + authRequest); @@ -152,10 +152,10 @@ public class OIDCSignedRequestFilter extends AbstractOIDCAuthenticationFilter { /** * @param authorizationEndpointURI - * @see org.mitre.openid.connect.config.OIDCServerConfiguration#setAuthorizationEndpointURI(java.lang.String) + * @see org.mitre.openid.connect.config.OIDCServerConfiguration#setAuthorizationEndpointUrl(java.lang.String) */ public void setAuthorizationEndpointURI(String authorizationEndpointURI) { - oidcServerConfig.setAuthorizationEndpointURI(authorizationEndpointURI); + oidcServerConfig.setAuthorizationEndpointUrl(authorizationEndpointURI); } /** @@ -184,10 +184,10 @@ public class OIDCSignedRequestFilter extends AbstractOIDCAuthenticationFilter { /** * @param tokenEndpointURI - * @see org.mitre.openid.connect.config.OIDCServerConfiguration#setTokenEndpointURI(java.lang.String) + * @see org.mitre.openid.connect.config.OIDCServerConfiguration#setTokenEndpointUrl(java.lang.String) */ public void setTokenEndpointURI(String tokenEndpointURI) { - oidcServerConfig.setTokenEndpointURI(tokenEndpointURI); + oidcServerConfig.setTokenEndpointUrl(tokenEndpointURI); } /** diff --git a/openid-connect-common/src/main/java/org/mitre/key/fetch/KeyFetcher.java b/openid-connect-common/src/main/java/org/mitre/key/fetch/KeyFetcher.java index 196b5e517..ead7642c0 100644 --- a/openid-connect-common/src/main/java/org/mitre/key/fetch/KeyFetcher.java +++ b/openid-connect-common/src/main/java/org/mitre/key/fetch/KeyFetcher.java @@ -41,7 +41,7 @@ public class KeyFetcher { try { jsonString = restTemplate.getForObject( - serverConfig.getTokenEndpointURI(), String.class); + serverConfig.getTokenEndpointUrl(), String.class); } catch (HttpClientErrorException httpClientErrorException) { throw new AuthenticationServiceException( diff --git a/openid-connect-common/src/main/java/org/mitre/openid/connect/config/OIDCServerConfiguration.java b/openid-connect-common/src/main/java/org/mitre/openid/connect/config/OIDCServerConfiguration.java index 9c0322721..249fc4b5c 100644 --- a/openid-connect-common/src/main/java/org/mitre/openid/connect/config/OIDCServerConfiguration.java +++ b/openid-connect-common/src/main/java/org/mitre/openid/connect/config/OIDCServerConfiguration.java @@ -23,9 +23,9 @@ import java.net.URI; */ public class OIDCServerConfiguration { - private String authorizationEndpointURI; + private String authorizationEndpointUrl; - private String tokenEndpointURI; + private String tokenEndpointUrl; private String clientSecret; @@ -43,8 +43,8 @@ public class OIDCServerConfiguration { private String userInfoUrl; - public String getAuthorizationEndpointURI() { - return authorizationEndpointURI; + public String getAuthorizationEndpointUrl() { + return authorizationEndpointUrl; } public String getClientId() { @@ -59,12 +59,12 @@ public class OIDCServerConfiguration { return clientSecret; } - public String getTokenEndpointURI() { - return tokenEndpointURI; + public String getTokenEndpointUrl() { + return tokenEndpointUrl; } - public void setAuthorizationEndpointURI(String authorizationEndpointURI) { - this.authorizationEndpointURI = authorizationEndpointURI; + public void setAuthorizationEndpointUrl(String authorizationEndpointURI) { + this.authorizationEndpointUrl = authorizationEndpointURI; } public void setClientId(String clientId) { @@ -79,8 +79,8 @@ public class OIDCServerConfiguration { this.clientSecret = clientSecret; } - public void setTokenEndpointURI(String tokenEndpointURI) { - this.tokenEndpointURI = tokenEndpointURI; + public void setTokenEndpointUrl(String tokenEndpointURI) { + this.tokenEndpointUrl = tokenEndpointURI; } public String getX509EncryptUrl() { @@ -134,7 +134,7 @@ public class OIDCServerConfiguration { */ @Override public String toString() { - return "OIDCServerConfiguration [authorizationEndpointURI=" + authorizationEndpointURI + ", tokenEndpointURI=" + tokenEndpointURI + ", clientSecret=" + clientSecret + ", clientId=" + clientId + ", issuer=" + issuer + ", x509EncryptUrl=" + x509EncryptUrl + ", x509SigningUrl=" + return "OIDCServerConfiguration [authorizationEndpointUrl=" + authorizationEndpointUrl + ", tokenEndpointUrl=" + tokenEndpointUrl + ", clientSecret=" + clientSecret + ", clientId=" + clientId + ", issuer=" + issuer + ", x509EncryptUrl=" + x509EncryptUrl + ", x509SigningUrl=" + x509SigningUrl + ", jwkEncryptUrl=" + jwkEncryptUrl + ", jwkSigningUrl=" + jwkSigningUrl + ", userInfoUrl=" + userInfoUrl + "]"; }