@Override public boolean allowSetPassword(Context context, HttpServletRequest request, String username) throws SQLException { for (AuthenticationMethod method : getAuthenticationMethodStack()) { if (method.allowSetPassword(context, request, username)) { return true; } } return false; }
protected int authenticateInternal(Context context, String username, String password, String realm, HttpServletRequest request, boolean implicitOnly) { // better is lowest, so start with the highest. int bestRet = AuthenticationMethod.BAD_ARGS; // return on first success, otherwise "best" outcome. for (AuthenticationMethod aMethodStack : getAuthenticationMethodStack()) { if (!implicitOnly || aMethodStack.isImplicit()) { int ret = 0; try { ret = aMethodStack.authenticate(context, username, password, realm, request); } catch (SQLException e) { ret = AuthenticationMethod.NO_SUCH_USER; } if (ret == AuthenticationMethod.SUCCESS) { updateLastActiveDate(context); return ret; } if (ret < bestRet) { bestRet = ret; } } } return bestRet; }
@Override public boolean canSelfRegister(Context context, HttpServletRequest request, String username) throws SQLException { for (AuthenticationMethod method : getAuthenticationMethodStack()) { if (method.canSelfRegister(context, request, username)) { return true; } } return false; }
try if (auth.loginPageURL( ContextUtil.obtainContext(objectModel), httpRequest, httpResponse) != null){
.get(HttpEnvironment.HTTP_RESPONSE_OBJECT); String loginURL = authMethod.loginPageURL(context, hreq, hresp); String authTitle = authMethod.loginPageTitle(context);
@Override public void initEPerson(Context context, HttpServletRequest request, EPerson eperson) throws SQLException { for (AuthenticationMethod method : getAuthenticationMethodStack()) { method.initEPerson(context, request, eperson); } }
@Override public List<Group> getSpecialGroups(Context context, HttpServletRequest request) throws SQLException { List<Group> result = new ArrayList<>(); int totalLen = 0; for (AuthenticationMethod method : getAuthenticationMethodStack()) { List<Group> gl = method.getSpecialGroups(context, request); if (gl.size() > 0) { result.addAll(gl); totalLen += gl.size(); } } return result; }
if (currAuthMethod.loginPageURL(ContextUtil .obtainContext(objectModel), httpRequest, httpResponse) != null) final String url = ((AuthenticationMethod) authMethod).loginPageURL( ContextUtil.obtainContext(objectModel), httpRequest, httpResponse);
.getCurrentRequest(); String loginPageURL = authenticationMethod .loginPageURL(context, currentRequest.getHttpServletRequest(), currentRequest.getHttpServletResponse()); if (StringUtils.isNotBlank(loginPageURL)) {
s = am.loginPageURL(context, request, response); if (s != null)