Package org.geogrid.aist.credential.services.security.gss

Examples of org.geogrid.aist.credential.services.security.gss.CredentialException


        try {
            dn = cred.getName().toString();
            this.credential = cred;
        } catch (GSSException e) {
            log.error("Error getting gss credential dn", e);
            throw new CredentialException(e.getMessage());
        }
    }
View Full Code Here


    }

    public void activate(GSSCredential cred)
            throws CredentialException {
        if (cred == null) {
            throw new CredentialException("No credential was provided for this context : " + dn);
        }
        try {
            if (cred.getRemainingLifetime() == 0) {
                throw new CredentialException("Credential is expired for this context : " + dn);
            }
            String credDn = cred.getName().toString();
            if (!credDn.equals(dn)) {
                throw new CredentialException("Credential dn [" + credDn + "] is invalid for this context : " + dn);
            }
            setDateLastActivated(new Date());
        } catch (GSSException e) {
            log.error("Unknown error for credential context : " + dn, e);
            throw new CredentialException("Unknown error for credential context : " + dn, e);
        }
        CredentialManagerServiceImpl.setCredential(dn, cred);
        this.credential = cred;
    }
View Full Code Here

        String credDn = null;
        try {
            credDn = credential.getName().toString();
        } catch (GSSException e) {
            log.warn(e.getMessage());
            throw new CredentialException("Unknown error occured", e);
        }
        CredentialContext context = getCredentialContextByDn(credDn);
        if (context == null) {
            throw new CredentialException("No credentialContext context found with dn " + credDn);
        }
        context.activate(credential);
        saveCredentialContext(context);
        return context;
   }
View Full Code Here

                if (fileName != null) {
                    credentialFiles.put(dn, fileName);
                }
            } catch (IOException e) {
                log.error("Unable to save credential to file", e);
                throw new CredentialException("Unable to save credential to file");
            }
        }
        credentials.put(dn, credential);
    }
View Full Code Here

TOP

Related Classes of org.geogrid.aist.credential.services.security.gss.CredentialException

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.