From bfce6e438d39ca1e87c440ed0b6a23aa5e64c17f Mon Sep 17 00:00:00 2001 From: Pat McCusker Date: Tue, 18 Feb 2025 14:17:11 -0500 Subject: [PATCH 1/2] Add fourth oauth grant type to javadoc Signed-off-by: Pat McCusker --- .../security/oauth2/core/AuthorizationGrantType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java index e1321bd7595..c914045202a 100644 --- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java +++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java @@ -28,7 +28,7 @@ * *

* The OAuth 2.0 Authorization Framework defines four standard grant types: authorization - * code, resource owner password credentials, and client credentials. It also provides an + * code, implicit, resource owner password credentials, and client credentials. It also provides an * extensibility mechanism for defining additional grant types. * * @author Joe Grandja From 2bd3cadde89dc65788f345ea8da8bb25061a290a Mon Sep 17 00:00:00 2001 From: Pat McCusker Date: Tue, 18 Feb 2025 14:24:25 -0500 Subject: [PATCH 2/2] Use possessive pronoun rather contraction Signed-off-by: Pat McCusker --- .../client/DelegatingOAuth2AuthorizedClientProvider.java | 4 ++-- .../DelegatingReactiveOAuth2AuthorizedClientProvider.java | 4 ++-- .../security/oauth2/client/OAuth2AuthorizedClient.java | 4 ++-- .../client/authentication/OAuth2AuthenticationToken.java | 4 ++-- .../client/userinfo/DelegatingOAuth2UserService.java | 6 +++--- .../web/DefaultOAuth2AuthorizationRequestResolver.java | 4 ++-- .../security/oauth2/core/AuthorizationGrantType.java | 8 ++++---- .../springframework/security/oauth2/jwt/JwtDecoder.java | 4 ++-- .../springframework/security/oauth2/jwt/JwtEncoder.java | 6 +++--- .../security/oauth2/jwt/NimbusReactiveJwtDecoder.java | 4 ++-- .../security/oauth2/jwt/ReactiveJwtDecoder.java | 6 +++--- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/DelegatingOAuth2AuthorizedClientProvider.java b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/DelegatingOAuth2AuthorizedClientProvider.java index 43cddfbb3e5..1d04c50ba9e 100644 --- a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/DelegatingOAuth2AuthorizedClientProvider.java +++ b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/DelegatingOAuth2AuthorizedClientProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ /** * An implementation of an {@link OAuth2AuthorizedClientProvider} that simply delegates to - * it's internal {@code List} of {@link OAuth2AuthorizedClientProvider}(s). + * its internal {@code List} of {@link OAuth2AuthorizedClientProvider}(s). *

* Each provider is given a chance to * {@link OAuth2AuthorizedClientProvider#authorize(OAuth2AuthorizationContext) authorize} diff --git a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/DelegatingReactiveOAuth2AuthorizedClientProvider.java b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/DelegatingReactiveOAuth2AuthorizedClientProvider.java index 38db964819e..4786c080b26 100644 --- a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/DelegatingReactiveOAuth2AuthorizedClientProvider.java +++ b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/DelegatingReactiveOAuth2AuthorizedClientProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ /** * An implementation of a {@link ReactiveOAuth2AuthorizedClientProvider} that simply - * delegates to it's internal {@code List} of + * delegates to its internal {@code List} of * {@link ReactiveOAuth2AuthorizedClientProvider}(s). *

* Each provider is given a chance to diff --git a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/OAuth2AuthorizedClient.java b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/OAuth2AuthorizedClient.java index 9d9efe1343c..33af4e6f144 100644 --- a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/OAuth2AuthorizedClient.java +++ b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/OAuth2AuthorizedClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ * A representation of an OAuth 2.0 "Authorized Client". *

* A client is considered "authorized" when the End-User (Resource Owner) has - * granted authorization to the client to access it's protected resources. + * granted authorization to the client to access its protected resources. *

* This class associates the {@link #getClientRegistration() Client} to the * {@link #getAccessToken() Access Token} granted/authorized by the diff --git a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/authentication/OAuth2AuthenticationToken.java b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/authentication/OAuth2AuthenticationToken.java index 7d5fdba3584..40c55ed8ed7 100644 --- a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/authentication/OAuth2AuthenticationToken.java +++ b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/authentication/OAuth2AuthenticationToken.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ *

* The {@link Authentication} associates an {@link OAuth2User} {@code Principal} to the * identifier of the {@link #getAuthorizedClientRegistrationId() Authorized Client}, which - * the End-User ({@code Principal}) granted authorization to so that it can access it's + * the End-User ({@code Principal}) granted authorization to so that it can access its * protected resources at the UserInfo Endpoint. * * @author Joe Grandja diff --git a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/DelegatingOAuth2UserService.java b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/DelegatingOAuth2UserService.java index 32e9ab81de6..de0f0a6436a 100644 --- a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/DelegatingOAuth2UserService.java +++ b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/userinfo/DelegatingOAuth2UserService.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,8 +26,8 @@ import org.springframework.util.Assert; /** - * An implementation of an {@link OAuth2UserService} that simply delegates to it's - * internal {@code List} of {@link OAuth2UserService}(s). + * An implementation of an {@link OAuth2UserService} that simply delegates to its internal + * {@code List} of {@link OAuth2UserService}(s). *

* Each {@link OAuth2UserService} is given a chance to * {@link OAuth2UserService#loadUser(OAuth2UserRequest) load} an {@link OAuth2User} with diff --git a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/web/DefaultOAuth2AuthorizationRequestResolver.java b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/web/DefaultOAuth2AuthorizationRequestResolver.java index c189317ec43..b51416e9087 100644 --- a/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/web/DefaultOAuth2AuthorizationRequestResolver.java +++ b/oauth2/oauth2-client/src/main/java/org/springframework/security/oauth2/client/web/DefaultOAuth2AuthorizationRequestResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,7 +52,7 @@ * *

* NOTE: The default base {@code URI} {@code /oauth2/authorization} may be - * overridden via it's constructor + * overridden via its constructor * {@link #DefaultOAuth2AuthorizationRequestResolver(ClientRegistrationRepository, String)}. * * @author Joe Grandja diff --git a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java index c914045202a..d9d2b599cec 100644 --- a/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java +++ b/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/AuthorizationGrantType.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,13 @@ /** * An authorization grant is a credential representing the resource owner's authorization - * (to access it's protected resources) to the client and used by the client to obtain an + * (to access its protected resources) to the client and used by the client to obtain an * access token. * *

* The OAuth 2.0 Authorization Framework defines four standard grant types: authorization - * code, implicit, resource owner password credentials, and client credentials. It also provides an - * extensibility mechanism for defining additional grant types. + * code, implicit, resource owner password credentials, and client credentials. It also + * provides an extensibility mechanism for defining additional grant types. * * @author Joe Grandja * @author Steve Riesenberg diff --git a/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtDecoder.java b/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtDecoder.java index adf6699193b..0c2267a8c9f 100644 --- a/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtDecoder.java +++ b/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ public interface JwtDecoder { /** - * Decodes the JWT from it's compact claims representation format and returns a + * Decodes the JWT from its compact claims representation format and returns a * {@link Jwt}. * @param token the JWT value * @return a {@link Jwt} diff --git a/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtEncoder.java b/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtEncoder.java index 4799fbe50c0..701a96b48a7 100644 --- a/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtEncoder.java +++ b/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/JwtEncoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ /** * Implementations of this interface are responsible for encoding a JSON Web Token (JWT) - * to it's compact claims representation format. + * to its compact claims representation format. * *

* JWTs may be represented using the JWS Compact Serialization format for a JSON Web @@ -47,7 +47,7 @@ public interface JwtEncoder { /** - * Encode the JWT to it's compact claims representation format. + * Encode the JWT to its compact claims representation format. * @param parameters the parameters containing the JOSE header and JWT Claims Set * @return a {@link Jwt} * @throws JwtEncodingException if an error occurs while attempting to encode the JWT diff --git a/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusReactiveJwtDecoder.java b/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusReactiveJwtDecoder.java index ffbed62c29d..bad9ecf2246 100644 --- a/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusReactiveJwtDecoder.java +++ b/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusReactiveJwtDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,7 +70,7 @@ /** * An implementation of a {@link ReactiveJwtDecoder} that "decodes" a JSON Web - * Token (JWT) and additionally verifies it's digital signature if the JWT is a JSON Web + * Token (JWT) and additionally verifies its digital signature if the JWT is a JSON Web * Signature (JWS). * *

diff --git a/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/ReactiveJwtDecoder.java b/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/ReactiveJwtDecoder.java index 85866dea303..b63759cdd90 100644 --- a/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/ReactiveJwtDecoder.java +++ b/oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/ReactiveJwtDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,7 @@ /** * Implementations of this interface are responsible for "decoding" a JSON Web - * Token (JWT) from it's compact claims representation format to a {@link Jwt}. + * Token (JWT) from its compact claims representation format to a {@link Jwt}. * *

* JWTs may be represented using the JWS Compact Serialization format for a JSON Web @@ -46,7 +46,7 @@ public interface ReactiveJwtDecoder { /** - * Decodes the JWT from it's compact claims representation format and returns a + * Decodes the JWT from its compact claims representation format and returns a * {@link Jwt}. * @param token the JWT value * @return a {@link Jwt}