Package de.innovationgate.webgate.api.auth

Examples of de.innovationgate.webgate.api.auth.AuthenticationModule


       
        if (!_ready) {
            _cachedListeners.remove(listener);
        }
       
        AuthenticationModule mod = getAuthModule();
        if (mod == null) {
            return;
        }
       
        mod.removeAuthenticationSourceListener(listener);
    }
View Full Code Here


    public void startupPostConnect(WGACoreEvent event) {
       
        // If we started before the startup connect we will now add all cached listeners to the now available auth module
        if (!_ready) {
            _ready = true;
            AuthenticationModule mod = getAuthModule();
            if (mod != null) {
                Iterator listeners = _cachedListeners.iterator();
                while (listeners.hasNext()) {
                    AuthenticationSourceListener listener = (AuthenticationSourceListener) listeners.next();
                    mod.addAuthenticationSourceListener(listener);
                }
            }
            _cachedListeners.clear();
        }
       
View Full Code Here

                            getLog().error("Unable to find authentication plugin " + auth);
                        }
                    }
                   
                    if (authImplClass != null) {
                        AuthenticationModule authModule = WGFactory.getAuthModuleFactory().getAuthModule(authImplClass, authOptions, db);
                        db.setAuthenticationModule(authModule);
                    }
                   
                }
               
View Full Code Here

        // will be used
        boolean masterLogin = false;
       
        // Create authentication session
        AuthenticationSession authSession = null;
        AuthenticationModule authModule = getAuthenticationModule();

        // Master login
        if (user == null && credentials == null) {
            user = this.masterLoginInputName;
            credentials = this.masterLoginPassword;
            masterLogin = true;
            authSession = MasterLoginAuthSession.getInstance();
        }
       
        // Anonymous login
        else if (user.equals(WGDatabase.ANONYMOUS_USER)) {
            authSession = AnonymousAuthSession.getInstance();
        }
       
        // Regular login against authentication module
       
        else if (authModule != null) {
            if (certAuthEnabled() && (credentials instanceof X509Certificate)) {
                authSession = ((CertAuthCapableAuthModule) authModule).login((X509Certificate) credentials);
            }
            else {
                authSession = authModule.login(user, credentials);
            }
           
            if (authSession == null) {
                return WGDatabase.ACCESSLEVEL_NOTLOGGEDIN;
            }
View Full Code Here

     * If this database uses a {@link RedirectionAuthModule} this method returns the real backend module. So this method should be used
     * to access the module if some special, non-standard, capabilities are to be used
     */
    public AuthenticationModule getAuthenticationModule() {
       
        AuthenticationModule backendModule = _authenticationModule;
        while (backendModule instanceof RedirectionAuthModule) {
            backendModule = ((RedirectionAuthModule) backendModule).getBackendModule();
        }
       
        return backendModule;
View Full Code Here

        if (certAuth != null && certAuth.equalsIgnoreCase("true")) {
            return false;
        }
       
        // If auth module is cert auth capable we return its status
        AuthenticationModule authModule = getAuthenticationModule();
        if (authModule instanceof CertAuthCapableAuthModule) {
            CertAuthCapableAuthModule certMod = (CertAuthCapableAuthModule) authModule;
            return certMod.isCertAuthEnabled();
        }
       
View Full Code Here

    public void setAuthenticationModule(AuthenticationModule authenticationModule) throws WGIllegalArgumentException {
       
        closeAuthenticationModule();
       
        // Unpack the auth module to see its real capabilities
        AuthenticationModule backendModule = authenticationModule;
        while (backendModule instanceof RedirectionAuthModule) {
            backendModule = ((RedirectionAuthModule) backendModule).getBackendModule();
        }
       
        if (certAuthEnabled() && (!(backendModule instanceof CertAuthCapableAuthModule))) {
View Full Code Here

            if (dc == null) {
                addwarning("No configuration found for domain: " + domainName);
                return null;
            }
           
            AuthenticationModule authModule = dc.getAuthModule();
            if (authModule != null) {
                return authModule.getAuthenticationSource();
            }
            else {
                return null;
            }
      }
View Full Code Here

        String eMail = (String) persistentStore.get(STORE_AUTHOR_EMAIL);
        if (eMail != null) {
            return eMail;
        }
       
        AuthenticationModule auth = getDatabase().getAuthenticationModule();
        if (auth == null) {
            return null;
        }
       
        eMail = auth.getEMailAddress(getAuthor());
        persistentStore.put(STORE_AUTHOR_EMAIL, eMail);
        return eMail;
       
    }
View Full Code Here

TOP

Related Classes of de.innovationgate.webgate.api.auth.AuthenticationModule

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.