List<String> approvedScope,
UserSubject userSubject,
ServerAccessToken preAuthorizedToken) {
ServerAccessToken token = null;
if (preAuthorizedToken == null) {
AccessTokenRegistration reg = new AccessTokenRegistration();
reg.setClient(client);
reg.setGrantType(OAuthConstants.IMPLICIT_GRANT);
reg.setSubject(userSubject);
reg.setRequestedScope(requestedScope);
reg.setApprovedScope(approvedScope);
reg.setAudience(params.getFirst(OAuthConstants.CLIENT_AUDIENCE));
token = getDataProvider().createAccessToken(reg);
} else {
token = preAuthorizedToken;
}