Browse Source

Polish

Closes gh-1842
pull/1845/head
Tran Ngoc Nhan 1 year ago committed by Joe Grandja
parent
commit
ed0265bf02
  1. 3
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/JdbcOAuth2AuthorizationService.java
  2. 4
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/authentication/OAuth2ClientAuthenticationToken.java

3
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/JdbcOAuth2AuthorizationService.java

@ -766,8 +766,7 @@ public class JdbcOAuth2AuthorizationService implements OAuth2AuthorizationServic
@Override @Override
protected void doSetValue(PreparedStatement ps, int parameterPosition, Object argValue) throws SQLException { protected void doSetValue(PreparedStatement ps, int parameterPosition, Object argValue) throws SQLException {
if (argValue instanceof SqlParameterValue) { if (argValue instanceof SqlParameterValue paramValue) {
SqlParameterValue paramValue = (SqlParameterValue) argValue;
if (paramValue.getSqlType() == Types.BLOB) { if (paramValue.getSqlType() == Types.BLOB) {
if (paramValue.getValue() != null) { if (paramValue.getValue() != null) {
Assert.isInstanceOf(byte[].class, paramValue.getValue(), Assert.isInstanceOf(byte[].class, paramValue.getValue(),

4
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/authentication/OAuth2ClientAuthenticationToken.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2020-2022 the original author or authors. * Copyright 2020-2024 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -92,7 +92,7 @@ public class OAuth2ClientAuthenticationToken extends AbstractAuthenticationToken
this.registeredClient = registeredClient; this.registeredClient = registeredClient;
this.clientAuthenticationMethod = clientAuthenticationMethod; this.clientAuthenticationMethod = clientAuthenticationMethod;
this.credentials = credentials; this.credentials = credentials;
this.additionalParameters = Collections.unmodifiableMap(Collections.emptyMap()); this.additionalParameters = Collections.emptyMap();
setAuthenticated(true); setAuthenticated(true);
} }

Loading…
Cancel
Save