Java 8 LoginException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 LoginException class.

This code example shows how to use the following methods:initCause
        } catch (IOException e) {
            LoginException le = new LoginException("Failed to get username/password");
            le.initCause(e);
            throw le;
        } catch (UnsupportedCallbackException e) {
            LoginException le = new LoginException("CallbackHandler does not support: " + e.getCallback());
            le.initCause(e);
            throw le;
        } 
        info[0] = username;
        info[1] = password;
        return info;
    } 
 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:initCause
        } catch (IOException e) {
            LoginException le = new LoginException("Failed to get username/password");
            le.initCause(e);
            throw le;
        } catch (UnsupportedCallbackException e) {
            LoginException le = new LoginException("CallbackHandler does not support: " + e.getCallback());
            le.initCause(e);
            throw le;
        } 
    } 
} 
7
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getCause, getMessage
     * javax.security.auth.login.LoginException#LoginException(String msg) 
     * Assertion: constructs with null parameter. 
     */ 
    public void testLoginException03() { 
        String msg = null;
        LoginException lE = new LoginException(msg);
        assertNull("getMessage() must return null.", lE.getMessage());
        assertNull("getCause() must return null", lE.getCause());
    } 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getMessage
 */ 
public class DefaultLoginExceptionResolver implements LoginExceptionResolver { 
    //~ Methods ======================================================================================================== 
 
    public AuthenticationException resolveException(LoginException e) {
        return new AuthenticationServiceException(e.getMessage(), e);
    } 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		try { 
			return (Principal)InstanceFactory.newInstance(
				_WLS_USER_IMPL, String.class, name);
		} 
		catch (Exception e) {
			throw new LoginException(e.getMessage());
		} 
	} 
 
	private static final String _WLS_USER_IMPL =
		"weblogic.security.principal.WLSUserImpl"; 
 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        try { 
            callbackHandler.handle(callbacks);
        } catch (IOException ioe) {
            throw new LoginException(ioe.getMessage());
        } catch (UnsupportedCallbackException uce) {
            throw new LoginException(uce.getMessage() + " Unable to obtain client certificates.");
        } 
        certificates = ((CertificateCallback)callbacks[0]).getCertificates();
 
        username = getUserNameForCertificates(certificates);
        if (username == null) {
            throw new FailedLoginException("No user for client certificate: " + getDistinguishedName(certificates));
        } 
 
        groups = getUserGroups(username);
 
        if (debug) {
            LOG.debug("Certificate for user: " + username);
        } 
        return true; 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
		try { 
			return (Principal)InstanceFactory.newInstance(
				_JPRINCIPAL, String.class, name);
		} 
		catch (Exception e) {
			throw new LoginException(e.getMessage());
		} 
	} 
 
	private static final String _JGROUP =
		"org.objectweb.jonas.security.auth.JGroup"; 
 
	private static final String _JPRINCIPAL =
		"org.objectweb.jonas.security.auth.JPrincipal"; 
 
	private static final String _JROLE =
		"org.objectweb.jonas.security.auth.JRole"; 
 
	private static final Log _log = LogFactoryUtil.getLog(
		PortalLoginModule.class); 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
			else { 
				throw new LoginException("Couldn't log-in to the WAZ Service: Invalid username or password");
			} 
		} 
		 
		throw new LoginException("Couldn't log-in to the WAZ Service: The login request returned " + httpResponse.getStatusLine().getReasonPhrase());
	} 
 
	public StorageCredentials getCredentials() throws Exception { 
		return new WAZServiceAccountCredentials(this.loginToWAZService());
	} 
 
	private URI getBlobEndpoint() throws URISyntaxException {
    	return PathUtility.appendPathToUri(this.m_WazServiceBaseUri, SHARED_ACCESS_SIGNATURE_SERVICE_PATH);
	} 
 
	private URI getTableEndpoint() throws URISyntaxException {
	 	return PathUtility.appendPathToUri(this.m_WazServiceBaseUri, TABLES_PROXY_SERVICE_PATH);
	} 
	 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
            if (ignoreMissingAuthentication) {
                log.warn(msg);
 
                return false; 
            } else { 
                throw new LoginException(msg);
            } 
        } 
 
        return true; 
    } 
 
    /** 
     * Log out the <code>Subject</code>. 
     * 
     * @return true if this method succeeded, or false if this <code>LoginModule</code> should be ignored. 
     * 
     * @exception LoginException if the logout fails 
     */ 
    public boolean logout() throws LoginException {
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 LoginException Methods: