Polish gh-314
Polish gh-304
This commit is contained in:
@@ -139,7 +139,7 @@ public final class JdbcOAuth2AuthorizationConsentService implements OAuth2Author
|
|||||||
@Override
|
@Override
|
||||||
public void remove(OAuth2AuthorizationConsent authorizationConsent) {
|
public void remove(OAuth2AuthorizationConsent authorizationConsent) {
|
||||||
Assert.notNull(authorizationConsent, "authorizationConsent cannot be null");
|
Assert.notNull(authorizationConsent, "authorizationConsent cannot be null");
|
||||||
SqlParameterValue[] parameters = new SqlParameterValue[]{
|
SqlParameterValue[] parameters = new SqlParameterValue[] {
|
||||||
new SqlParameterValue(Types.VARCHAR, authorizationConsent.getRegisteredClientId()),
|
new SqlParameterValue(Types.VARCHAR, authorizationConsent.getRegisteredClientId()),
|
||||||
new SqlParameterValue(Types.VARCHAR, authorizationConsent.getPrincipalName())
|
new SqlParameterValue(Types.VARCHAR, authorizationConsent.getPrincipalName())
|
||||||
};
|
};
|
||||||
@@ -152,7 +152,7 @@ public final class JdbcOAuth2AuthorizationConsentService implements OAuth2Author
|
|||||||
public OAuth2AuthorizationConsent findById(String registeredClientId, String principalName) {
|
public OAuth2AuthorizationConsent findById(String registeredClientId, String principalName) {
|
||||||
Assert.hasText(registeredClientId, "registeredClientId cannot be empty");
|
Assert.hasText(registeredClientId, "registeredClientId cannot be empty");
|
||||||
Assert.hasText(principalName, "principalName cannot be empty");
|
Assert.hasText(principalName, "principalName cannot be empty");
|
||||||
SqlParameterValue[] parameters = new SqlParameterValue[]{
|
SqlParameterValue[] parameters = new SqlParameterValue[] {
|
||||||
new SqlParameterValue(Types.VARCHAR, registeredClientId),
|
new SqlParameterValue(Types.VARCHAR, registeredClientId),
|
||||||
new SqlParameterValue(Types.VARCHAR, principalName)};
|
new SqlParameterValue(Types.VARCHAR, principalName)};
|
||||||
PreparedStatementSetter pss = new ArgumentPreparedStatementSetter(parameters);
|
PreparedStatementSetter pss = new ArgumentPreparedStatementSetter(parameters);
|
||||||
@@ -209,7 +209,7 @@ public final class JdbcOAuth2AuthorizationConsentService implements OAuth2Author
|
|||||||
.findById(registeredClientId);
|
.findById(registeredClientId);
|
||||||
if (registeredClient == null) {
|
if (registeredClient == null) {
|
||||||
throw new DataRetrievalFailureException(
|
throw new DataRetrievalFailureException(
|
||||||
"The RegisteredClient with id '" + registeredClientId + "' it was not found in the RegisteredClientRepository.");
|
"The RegisteredClient with id '" + registeredClientId + "' was not found in the RegisteredClientRepository.");
|
||||||
}
|
}
|
||||||
|
|
||||||
String principalName = rs.getString("principal_name");
|
String principalName = rs.getString("principal_name");
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ public final class JdbcOAuth2AuthorizationService implements OAuth2Authorization
|
|||||||
@Override
|
@Override
|
||||||
public void remove(OAuth2Authorization authorization) {
|
public void remove(OAuth2Authorization authorization) {
|
||||||
Assert.notNull(authorization, "authorization cannot be null");
|
Assert.notNull(authorization, "authorization cannot be null");
|
||||||
SqlParameterValue[] parameters = new SqlParameterValue[]{
|
SqlParameterValue[] parameters = new SqlParameterValue[] {
|
||||||
new SqlParameterValue(Types.VARCHAR, authorization.getId())
|
new SqlParameterValue(Types.VARCHAR, authorization.getId())
|
||||||
};
|
};
|
||||||
PreparedStatementSetter pss = new ArgumentPreparedStatementSetter(parameters);
|
PreparedStatementSetter pss = new ArgumentPreparedStatementSetter(parameters);
|
||||||
@@ -325,7 +325,7 @@ public final class JdbcOAuth2AuthorizationService implements OAuth2Authorization
|
|||||||
RegisteredClient registeredClient = this.registeredClientRepository.findById(registeredClientId);
|
RegisteredClient registeredClient = this.registeredClientRepository.findById(registeredClientId);
|
||||||
if (registeredClient == null) {
|
if (registeredClient == null) {
|
||||||
throw new DataRetrievalFailureException(
|
throw new DataRetrievalFailureException(
|
||||||
"The RegisteredClient with id '" + registeredClientId + "' it was not found in the RegisteredClientRepository.");
|
"The RegisteredClient with id '" + registeredClientId + "' was not found in the RegisteredClientRepository.");
|
||||||
}
|
}
|
||||||
|
|
||||||
OAuth2Authorization.Builder builder = OAuth2Authorization.withRegisteredClient(registeredClient);
|
OAuth2Authorization.Builder builder = OAuth2Authorization.withRegisteredClient(registeredClient);
|
||||||
|
|||||||
Reference in New Issue
Block a user