Browse Source

additional JOSE class renaming

pull/779/head
Justin Richer 10 years ago
parent
commit
522edda074
  1. 8
      openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml
  2. 6
      openid-connect-server/src/main/java/org/mitre/openid/connect/assertion/JWTBearerAssertionAuthenticationToken.java
  3. 12
      openid-connect-server/src/main/java/org/mitre/openid/connect/assertion/JWTBearerAuthenticationProvider.java
  4. 8
      openid-connect-server/src/main/java/org/mitre/openid/connect/assertion/JWTBearerClientAssertionTokenEndpointFilter.java

8
openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml

@ -177,17 +177,17 @@
<property name="filterProcessesUrl" value="/revoke"/>
</bean>
<bean id="clientAssertionTokenEndpointFilter" class="org.mitre.openid.connect.assertion.JwtBearerClientAssertionTokenEndpointFilter">
<bean id="clientAssertionTokenEndpointFilter" class="org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter">
<property name="authenticationManager" ref="clientAssertionAuthenticationManager" />
<property name="filterProcessesUrl" value="/token" />
</bean>
<bean id="clientAssertionIntrospectionEndpointFilter" class="org.mitre.openid.connect.assertion.JwtBearerClientAssertionTokenEndpointFilter">
<bean id="clientAssertionIntrospectionEndpointFilter" class="org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter">
<property name="authenticationManager" ref="clientAssertionAuthenticationManager" />
<property name="filterProcessesUrl" value="/introspect" />
</bean>
<bean id="clientAssertionRevocationEndpointFilter" class="org.mitre.openid.connect.assertion.JwtBearerClientAssertionTokenEndpointFilter">
<bean id="clientAssertionRevocationEndpointFilter" class="org.mitre.openid.connect.assertion.JWTBearerClientAssertionTokenEndpointFilter">
<property name="authenticationManager" ref="clientAssertionAuthenticationManager" />
<property name="filterProcessesUrl" value="/revoke" />
</bean>
@ -200,7 +200,7 @@
<security:authentication-provider ref="clientAssertionAuthenticationProvider" />
</security:authentication-manager>
<bean id="clientAssertionAuthenticationProvider" class="org.mitre.openid.connect.assertion.JwtBearerAuthenticationProvider" />
<bean id="clientAssertionAuthenticationProvider" class="org.mitre.openid.connect.assertion.JWTBearerAuthenticationProvider" />
<!-- Configure locale information -->
<bean id="messageSource"

6
openid-connect-server/src/main/java/org/mitre/openid/connect/assertion/JwtBearerAssertionAuthenticationToken.java → openid-connect-server/src/main/java/org/mitre/openid/connect/assertion/JWTBearerAssertionAuthenticationToken.java

@ -30,7 +30,7 @@ import com.nimbusds.jwt.JWT;
* @author jricher
*
*/
public class JwtBearerAssertionAuthenticationToken extends AbstractAuthenticationToken {
public class JWTBearerAssertionAuthenticationToken extends AbstractAuthenticationToken {
/**
*
@ -44,7 +44,7 @@ public class JwtBearerAssertionAuthenticationToken extends AbstractAuthenticatio
* @param clientId
* @param jwt
*/
public JwtBearerAssertionAuthenticationToken(String clientId, JWT jwt) {
public JWTBearerAssertionAuthenticationToken(String clientId, JWT jwt) {
super(null);
this.clientId = clientId;
this.jwt = jwt;
@ -57,7 +57,7 @@ public class JwtBearerAssertionAuthenticationToken extends AbstractAuthenticatio
* @param jwt
* @param authorities
*/
public JwtBearerAssertionAuthenticationToken(String clientId, JWT jwt, Collection<? extends GrantedAuthority> authorities) {
public JWTBearerAssertionAuthenticationToken(String clientId, JWT jwt, Collection<? extends GrantedAuthority> authorities) {
super(authorities);
this.clientId = clientId;
this.jwt = jwt;

12
openid-connect-server/src/main/java/org/mitre/openid/connect/assertion/JwtBearerAuthenticationProvider.java → openid-connect-server/src/main/java/org/mitre/openid/connect/assertion/JWTBearerAuthenticationProvider.java

@ -52,9 +52,9 @@ import com.nimbusds.jwt.SignedJWT;
* @author jricher
*
*/
public class JwtBearerAuthenticationProvider implements AuthenticationProvider {
public class JWTBearerAuthenticationProvider implements AuthenticationProvider {
private static final Logger logger = LoggerFactory.getLogger(JwtBearerAuthenticationProvider.class);
private static final Logger logger = LoggerFactory.getLogger(JWTBearerAuthenticationProvider.class);
private static final GrantedAuthority ROLE_CLIENT = new SimpleGrantedAuthority("ROLE_CLIENT");
@ -83,7 +83,7 @@ public class JwtBearerAuthenticationProvider implements AuthenticationProvider {
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
JwtBearerAssertionAuthenticationToken jwtAuth = (JwtBearerAssertionAuthenticationToken)authentication;
JWTBearerAssertionAuthenticationToken jwtAuth = (JWTBearerAssertionAuthenticationToken)authentication;
try {
@ -193,7 +193,7 @@ public class JwtBearerAuthenticationProvider implements AuthenticationProvider {
Set<GrantedAuthority> authorities = new HashSet<>(client.getAuthorities());
authorities.add(ROLE_CLIENT);
return new JwtBearerAssertionAuthenticationToken(client.getClientId(), jwt, authorities);
return new JWTBearerAssertionAuthenticationToken(client.getClientId(), jwt, authorities);
} catch (InvalidClientException e) {
throw new UsernameNotFoundException("Could not find client: " + jwtAuth.getClientId());
@ -206,11 +206,11 @@ public class JwtBearerAuthenticationProvider implements AuthenticationProvider {
}
/**
* We support {@link JwtBearerAssertionAuthenticationToken}s only.
* We support {@link JWTBearerAssertionAuthenticationToken}s only.
*/
@Override
public boolean supports(Class<?> authentication) {
return (JwtBearerAssertionAuthenticationToken.class.isAssignableFrom(authentication));
return (JWTBearerAssertionAuthenticationToken.class.isAssignableFrom(authentication));
}
}

8
openid-connect-server/src/main/java/org/mitre/openid/connect/assertion/JwtBearerClientAssertionTokenEndpointFilter.java → openid-connect-server/src/main/java/org/mitre/openid/connect/assertion/JWTBearerClientAssertionTokenEndpointFilter.java

@ -41,13 +41,13 @@ import com.nimbusds.jwt.JWTParser;
* @author jricher
*
*/
public class JwtBearerClientAssertionTokenEndpointFilter extends ClientCredentialsTokenEndpointFilter {
public class JWTBearerClientAssertionTokenEndpointFilter extends ClientCredentialsTokenEndpointFilter {
public JwtBearerClientAssertionTokenEndpointFilter() {
public JWTBearerClientAssertionTokenEndpointFilter() {
super();
}
public JwtBearerClientAssertionTokenEndpointFilter(String path) {
public JWTBearerClientAssertionTokenEndpointFilter(String path) {
super(path);
}
@ -66,7 +66,7 @@ public class JwtBearerClientAssertionTokenEndpointFilter extends ClientCredentia
String clientId = jwt.getJWTClaimsSet().getSubject();
Authentication authRequest = new JwtBearerAssertionAuthenticationToken(clientId, jwt);
Authentication authRequest = new JWTBearerAssertionAuthenticationToken(clientId, jwt);
return this.getAuthenticationManager().authenticate(authRequest);
} catch (ParseException e) {
Loading…
Cancel
Save