Skip to content

Commit

Permalink
Implement Serial
Browse files Browse the repository at this point in the history
Signed-off-by: Tran Ngoc Nhan <[email protected]>
  • Loading branch information
ngocnhan-tran1996 authored and rwinch committed Jan 22, 2025
1 parent 5da7f0e commit e5ea75f
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
import org.springframework.security.oauth2.client.oidc.session.OidcSessionInformation;
import org.springframework.security.oauth2.client.oidc.session.TestOidcSessionInformations;
import org.springframework.security.oauth2.client.registration.ClientRegistration;
import org.springframework.security.oauth2.client.registration.ClientRegistration.ClientSettings;
import org.springframework.security.oauth2.client.registration.TestClientRegistrations;
import org.springframework.security.oauth2.core.DefaultOAuth2AuthenticatedPrincipal;
import org.springframework.security.oauth2.core.OAuth2AccessToken;
Expand Down Expand Up @@ -239,11 +240,12 @@ class SpringSecurityCoreVersionSerializableTests {
(r) -> new ReactiveSessionInformation(user, r.alphanumeric(4), Instant.ofEpochMilli(1704378933936L)));
generatorByClassName.put(OAuth2AccessToken.class, (r) -> TestOAuth2AccessTokens.scopes("scope"));
generatorByClassName.put(OAuth2DeviceCode.class,
(r) -> new OAuth2DeviceCode("token", Instant.now(), Instant.now()));
(r) -> new OAuth2DeviceCode("token", Instant.now(), Instant.now().plusSeconds(1)));
generatorByClassName.put(OAuth2RefreshToken.class,
(r) -> new OAuth2RefreshToken("refreshToken", Instant.now(), Instant.now()));
(r) -> new OAuth2RefreshToken("refreshToken", Instant.now(), Instant.now().plusSeconds(1)));
generatorByClassName.put(OAuth2UserCode.class,
(r) -> new OAuth2UserCode("token", Instant.now(), Instant.now()));
(r) -> new OAuth2UserCode("token", Instant.now(), Instant.now().plusSeconds(1)));
generatorByClassName.put(ClientSettings.class, (r) -> ClientSettings.builder().build());
generatorByClassName.put(DefaultOidcUser.class, (r) -> TestOidcUsers.create());
generatorByClassName.put(OidcUserAuthority.class,
(r) -> new OidcUserAuthority(TestOidcIdTokens.idToken().build(),
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.springframework.security.oauth2.client.registration;

import java.io.Serial;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -748,7 +749,10 @@ private static boolean withinTheRangeOf(int c, int min, int max) {
* @author DingHao
* @since 6.5
*/
public static final class ClientSettings {
public static final class ClientSettings implements Serializable {

@Serial
private static final long serialVersionUID = 7495627155437124692L;

private boolean requireProofKey;

Expand Down

0 comments on commit e5ea75f

Please sign in to comment.