Fixed authentication time format in authentication controller.
Change-Id: I9fab076ba1dcd02ce6f8cb69c9e435b6234da371
diff --git a/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuAuthorizationService.java b/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuAuthorizationService.java
index f1bb28c..3a7a294 100644
--- a/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuAuthorizationService.java
+++ b/full/src/main/java/de/ids_mannheim/korap/oauth2/oltu/service/OltuAuthorizationService.java
@@ -53,9 +53,6 @@
ZonedDateTime authenticationTime)
throws OAuthSystemException, KustvaktException {
- String code = oauthIssuer.authorizationCode();
- checkResponseType(authzRequest.getResponseType());
-
String clientId = authzRequest.getClientId();
OAuth2Client client = clientService.authenticateClientId(clientId);
@@ -71,8 +68,10 @@
"Invalid redirect URI", OAuth2Error.INVALID_REQUEST);
}
- String scope;
+ String scope, code;
try {
+ code = oauthIssuer.authorizationCode();
+ checkResponseType(authzRequest.getResponseType());
scope = createAuthorization(username, authzRequest.getClientId(),
redirectUri, authzRequest.getScopes(), code,
authenticationTime, null);