Skip to content

Commit c7f01f0

Browse files
committed
Polish gh-427
1 parent 37e4561 commit c7f01f0

File tree

13 files changed

+378
-584
lines changed

13 files changed

+378
-584
lines changed

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/core/oidc/OidcClientMetadataClaimAccessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,12 @@ default String getRegistrationAccessToken() {
146146
}
147147

148148
/**
149-
* Returns the {@code URL} of the OAuth 2.0 Client Configuration Endpoint.
149+
* Returns the {@code URL} of the Client Configuration Endpoint where the Registration Access Token can be used.
150150
*
151-
* @return the {@code URL} of the OAuth 2.0 Client Configuration Endpoint
151+
* @return the {@code URL} of the Client Configuration Endpoint where the Registration Access Token can be used
152152
* @since 0.2.1
153153
*/
154-
default URL getRegistrationClientUri() {
154+
default URL getRegistrationClientUrl() {
155155
return getClaimAsURL(OidcClientMetadataClaimNames.REGISTRATION_CLIENT_URI);
156156
}
157157

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/core/oidc/OidcClientMetadataClaimNames.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ public interface OidcClientMetadataClaimNames {
8484
String ID_TOKEN_SIGNED_RESPONSE_ALG = "id_token_signed_response_alg";
8585

8686
/**
87-
* {@code registration_access_token} - Registration Access Token that can be used at the Client Configuration Endpoint to perform subsequent operations upon the Client registration
87+
* {@code registration_access_token} - the Registration Access Token that can be used at the Client Configuration Endpoint
8888
* @since 0.2.1
8989
*/
9090
String REGISTRATION_ACCESS_TOKEN = "registration_access_token";
9191

9292
/**
93-
* {@code registration_client_uri} - the {@code URL} of the OAuth 2.0 Client Configuration Endpoint
93+
* {@code registration_client_uri} - the {@code URL} of the Client Configuration Endpoint where the Registration Access Token can be used
9494
* @since 0.2.1
9595
*/
9696
String REGISTRATION_CLIENT_URI = "registration_client_uri";

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/core/oidc/OidcClientRegistration.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,23 +252,25 @@ public Builder idTokenSignedResponseAlgorithm(String idTokenSignedResponseAlgori
252252
}
253253

254254
/**
255-
* Sets the Registration Access Token that can be used at the Client Configuration Endpoint to perform subsequent operations upon the Client registration, OPTIONAL.
255+
* Sets the Registration Access Token that can be used at the Client Configuration Endpoint, OPTIONAL.
256256
*
257-
* @param registrationAccessToken the Registration Access Token that can be used at the Client Configuration Endpoint to perform subsequent operations upon the Client registration
257+
* @param registrationAccessToken the Registration Access Token that can be used at the Client Configuration Endpoint
258258
* @return the {@link Builder} for further configuration
259+
* @since 0.2.1
259260
*/
260261
public Builder registrationAccessToken(String registrationAccessToken) {
261262
return claim(OidcClientMetadataClaimNames.REGISTRATION_ACCESS_TOKEN, registrationAccessToken);
262263
}
263264

264265
/**
265-
* Sets the {@code URL} of the OAuth 2.0 Client Configuration Endpoint, OPTIONAL.
266+
* Sets the {@code URL} of the Client Configuration Endpoint where the Registration Access Token can be used, OPTIONAL.
266267
*
267-
* @param registrationClientUri the {@code URL} of the OAuth 2.0 Client Configuration Endpoint
268+
* @param registrationClientUrl the {@code URL} of the Client Configuration Endpoint where the Registration Access Token can be used
268269
* @return the {@link Builder} for further configuration
270+
* @since 0.2.1
269271
*/
270-
public Builder registrationClientUri(String registrationClientUri) {
271-
return claim(OidcClientMetadataClaimNames.REGISTRATION_CLIENT_URI, registrationClientUri);
272+
public Builder registrationClientUrl(String registrationClientUrl) {
273+
return claim(OidcClientMetadataClaimNames.REGISTRATION_CLIENT_URI, registrationClientUrl);
272274
}
273275

274276
/**

oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/oidc/authentication/JwtUtils.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.Collections;
2020
import java.util.Set;
2121

22+
import org.springframework.security.authentication.AuthenticationProvider;
2223
import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames;
2324
import org.springframework.security.oauth2.jose.jws.SignatureAlgorithm;
2425
import org.springframework.security.oauth2.jwt.JoseHeader;
@@ -29,14 +30,17 @@
2930
import org.springframework.util.StringUtils;
3031

3132
/**
33+
* TODO
34+
* This class is mostly a straight copy from {@code org.springframework.security.oauth2.server.authorization.authentication.JwtUtils}.
35+
* It should be consolidated when we introduce a token generator abstraction.
36+
*
37+
* Utility methods used by the {@link AuthenticationProvider}'s when issuing {@link Jwt}'s.
3238
*
33-
* Utility methods used by the {@link OidcClientRegistrationAuthenticationProvider} when issuing {@link Jwt}'s.
3439
* @author Ovidiu Popa
3540
* @since 0.2.1
3641
*/
3742
final class JwtUtils {
3843

39-
//TODO Duplicate of {@code org.springframework.security.oauth2.server.authorization.authentication.JwtUtils}. To be refactored
4044
private JwtUtils() {
4145
}
4246

0 commit comments

Comments
 (0)