mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
improve authentication api for issue '#3 Add extension point for plugins to define groups and their members'
This commit is contained in:
@@ -97,11 +97,10 @@ public class ChainAuthenticatonManager extends AbstractAuthenticationManager
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public User authenticate(HttpServletRequest request,
|
||||
HttpServletResponse response, String username,
|
||||
String password)
|
||||
public AuthenticationResult authenticate(HttpServletRequest request,
|
||||
HttpServletResponse response, String username, String password)
|
||||
{
|
||||
User user = null;
|
||||
AuthenticationResult ar = null;
|
||||
|
||||
for (AuthenticationHandler authenticator : authenticationHandlerSet)
|
||||
{
|
||||
@@ -122,8 +121,10 @@ public class ChainAuthenticatonManager extends AbstractAuthenticationManager
|
||||
{
|
||||
if (result.getState().isSuccessfully() && (result.getUser() != null))
|
||||
{
|
||||
user = result.getUser();
|
||||
User user = result.getUser();
|
||||
|
||||
user.setType(authenticator.getType());
|
||||
ar = result;
|
||||
|
||||
// notify authentication listeners
|
||||
fireAuthenticationEvent(request, response, user);
|
||||
@@ -138,7 +139,7 @@ public class ChainAuthenticatonManager extends AbstractAuthenticationManager
|
||||
}
|
||||
}
|
||||
|
||||
return user;
|
||||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user