/** * Perform implicit authentication. The authenticationManager will consult * the authentication stack for any methods that can implicitly authenticate * this session. If the attempt was successful then the returned context * will have an eperson attached other wise the context will not have an * eperson attached. * * @param objectModel * Cocoon's object model. * @return This requests DSpace context. */ public static Context authenticateImplicit(Map objectModel) throws SQLException { // Get the real HttpRequest final HttpServletRequest request = (HttpServletRequest) objectModel .get(HttpEnvironment.HTTP_REQUEST_OBJECT); Context context = ContextUtil.obtainContext(objectModel); int implicitStatus = AuthenticationManager.authenticateImplicit( context, null, null, null, request); if (implicitStatus == AuthenticationMethod.SUCCESS) { log.info(LogManager.getHeader(context, "login", "type=implicit")); AuthenticationUtil.logIn(context, request, context.getCurrentUser()); } return context; }
if (AuthenticationManager.authenticateImplicit(context, null, null, null, request) == AuthenticationMethod.SUCCESS)
Context context = ContextUtil.obtainContext(objectModel); int implicitStatus = AuthenticationManager.authenticateImplicit( context, null, null, null, request);