Package org.apache.geronimo.security.realm.providers

Examples of org.apache.geronimo.security.realm.providers.RequestCallbackHandler


    @Override
    public AuthResult validateRequest(Request request, HttpServletResponse response, boolean isAuthMandatory,
            UserIdentity cachedIdentity) throws ServerAuthException {
        try {
            HttpServletRequest httpRequest = request.getRequest();
            UserIdentity userIdentity = loginService.login(new RequestCallbackHandler(httpRequest));
            if (userIdentity != null) {
                return new AuthResult(TomcatAuthStatus.SUCCESS, userIdentity, false);
            } else {
                response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
                return new AuthResult(TomcatAuthStatus.FAILURE, unauthenticatedIdentity, false);
View Full Code Here


    @Override
    public AuthResult validateRequest(Request request, HttpServletResponse response, boolean isAuthMandatory,
            UserIdentity cachedIdentity) throws ServerAuthException {
        try {
            HttpServletRequest httpRequest = request.getRequest();
            UserIdentity userIdentity = loginService.login(new RequestCallbackHandler(httpRequest));
            if (userIdentity != null) {
                return new AuthResult(TomcatAuthStatus.SUCCESS, userIdentity, false);
            } else {
                response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
                return new AuthResult(TomcatAuthStatus.FAILURE, unauthenticatedIdentity, false);
View Full Code Here

     */
    public Principal authenticate(HttpServletRequest httpRequest) {
        if (httpRequest == null) {
            return null;
        }
        CallbackHandler callbackHandler = new RequestCallbackHandler(httpRequest);
        String hostName = httpRequest.getRemoteHost();
        try {
            LoginContext loginContext = null;
            if (appName == null)
                appName = "Tomcat";
View Full Code Here

TOP

Related Classes of org.apache.geronimo.security.realm.providers.RequestCallbackHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.