mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 19:43:10 +00:00
85276: Store and retrieve the Authentication method in the JWT
This commit is contained in:
@@ -193,4 +193,17 @@ public class AuthenticationServiceImpl implements AuthenticationService {
|
||||
public Iterator<AuthenticationMethod> authenticationMethodIterator() {
|
||||
return getAuthenticationMethodStack().iterator();
|
||||
}
|
||||
|
||||
public String getAuthenticationMethod(final Context context, final HttpServletRequest request) {
|
||||
final Iterator<AuthenticationMethod> authenticationMethodIterator = authenticationMethodIterator();
|
||||
|
||||
while (authenticationMethodIterator.hasNext()) {
|
||||
final AuthenticationMethod authenticationMethod = authenticationMethodIterator.next();
|
||||
if (authenticationMethod.isUsed(context, request)) {
|
||||
return authenticationMethod.getName();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user