mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
Fix PreCommit
This commit is contained in:
@@ -84,7 +84,7 @@ class SpringBasedIdentityServiceFacade implements IdentityServiceFacade
|
|||||||
private final JwtDecoder jwtDecoder;
|
private final JwtDecoder jwtDecoder;
|
||||||
|
|
||||||
SpringBasedIdentityServiceFacade(RestOperations restOperations, ClientRegistration clientRegistration,
|
SpringBasedIdentityServiceFacade(RestOperations restOperations, ClientRegistration clientRegistration,
|
||||||
JwtDecoder jwtDecoder)
|
JwtDecoder jwtDecoder)
|
||||||
{
|
{
|
||||||
requireNonNull(restOperations);
|
requireNonNull(restOperations);
|
||||||
this.clientRegistration = requireNonNull(clientRegistration);
|
this.clientRegistration = requireNonNull(clientRegistration);
|
||||||
@@ -106,11 +106,13 @@ class SpringBasedIdentityServiceFacade implements IdentityServiceFacade
|
|||||||
{
|
{
|
||||||
response = client.getTokenResponse(request);
|
response = client.getTokenResponse(request);
|
||||||
}
|
}
|
||||||
catch (OAuth2AuthorizationException e) {
|
catch (OAuth2AuthorizationException e)
|
||||||
|
{
|
||||||
LOGGER.debug("Failed to authorize against Authorization Server. Reason: " + e.getError() + ".");
|
LOGGER.debug("Failed to authorize against Authorization Server. Reason: " + e.getError() + ".");
|
||||||
throw new AuthorizationException("Failed to obtain access token. " + e.getError(), e);
|
throw new AuthorizationException("Failed to obtain access token. " + e.getError(), e);
|
||||||
}
|
}
|
||||||
catch (RuntimeException e) {
|
catch (RuntimeException e)
|
||||||
|
{
|
||||||
LOGGER.warn("Failed to authorize against Authorization Server. Reason: " + e.getMessage());
|
LOGGER.warn("Failed to authorize against Authorization Server. Reason: " + e.getMessage());
|
||||||
throw new AuthorizationException("Failed to obtain access token.", e);
|
throw new AuthorizationException("Failed to obtain access token.", e);
|
||||||
}
|
}
|
||||||
@@ -257,7 +259,7 @@ class SpringBasedIdentityServiceFacade implements IdentityServiceFacade
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static OAuth2AccessTokenResponseClient<OAuth2PasswordGrantRequest> createPasswordClient(RestOperations rest,
|
private static OAuth2AccessTokenResponseClient<OAuth2PasswordGrantRequest> createPasswordClient(RestOperations rest,
|
||||||
ClientRegistration clientRegistration)
|
ClientRegistration clientRegistration)
|
||||||
{
|
{
|
||||||
final DefaultPasswordTokenResponseClient client = new DefaultPasswordTokenResponseClient();
|
final DefaultPasswordTokenResponseClient client = new DefaultPasswordTokenResponseClient();
|
||||||
client.setRestOperations(rest);
|
client.setRestOperations(rest);
|
||||||
|
Reference in New Issue
Block a user