Examples of CredentialsException


Examples of org.pac4j.core.exception.CredentialsException

            logger.info("No credential found in this gateway round-trip");
            return null;
        } else {
            final String message = "No ticket or logout request";
            logger.error(message);
            throw new CredentialsException(message);
        }
    }
View Full Code Here

Examples of org.pac4j.core.exception.CredentialsException

        }
    }
   
    protected void throwsException(final String message) {
        logger.error(message);
        throw new CredentialsException(message);
    }
View Full Code Here

Examples of org.pac4j.core.exception.CredentialsException

        String token;
        try {
            token = new String(decoded, "UTF-8");
        } catch (final UnsupportedEncodingException e) {
            throw new CredentialsException("Bad format of the basic auth header");
        }

        final int delim = token.indexOf(":");
        if (delim < 0) {
            throw new CredentialsException("Bad format of the basic auth header");
        }
        final UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(token.substring(0, delim),
                token.substring(delim + 1), getName());
        logger.debug("usernamePasswordCredentials : {}", credentials);
        try {
View Full Code Here

Examples of org.rssowl.core.connection.CredentialsException

  public ICredentials getAuthCredentials(URI link) throws CredentialsException {
    String protocol = link.getScheme();

    /* Require protocol */
    if (!StringUtils.isSet(protocol))
      throw new CredentialsException(Activator.getDefault().createErrorStatus("Unknown protocol", null));

    /* Require credentials provider */
    ICredentialsProvider credentialsProvider = fCredentialsProvider.get(protocol);
    if (credentialsProvider == null)
      throw new CredentialsException(Activator.getDefault().createErrorStatus("Could not find any credentials provider for protocol: " + protocol, null));

    /* Retrieve Credentials */
    ICredentials credentials = credentialsProvider.getAuthCredentials(link);
    return credentials;
  }
View Full Code Here

Examples of org.rssowl.core.connection.CredentialsException

  public IProxyCredentials getProxyCredentials(URI link) throws CredentialsException {
    String protocol = link.getScheme();

    /* Require protocol */
    if (!StringUtils.isSet(protocol))
      throw new CredentialsException(Activator.getDefault().createErrorStatus("Unknown protocol", null));

    /* Require credentials provider */
    ICredentialsProvider credentialsProvider = fCredentialsProvider.get(protocol);
    if (credentialsProvider == null)
      throw new CredentialsException(Activator.getDefault().createErrorStatus("Could not find any credentials provider for protocol: " + protocol, null));

    /* Retrieve Credentials */
    IProxyCredentials credentials = credentialsProvider.getProxyCredentials(link);
    return credentials;
  }
View Full Code Here

Examples of org.rssowl.core.connection.CredentialsException

  private ICredentialsProvider internalGetCredentialsProvider(URI link) throws CredentialsException {
    String protocol = link.getScheme();

    /* Require protocol */
    if (!StringUtils.isSet(protocol))
      throw new CredentialsException(Activator.getDefault().createErrorStatus(Messages.ConnectionServiceImpl_ERROR_UNKNOWN_PROTOCOL, null));

    /* Require credentials provider */
    ICredentialsProvider credentialsProvider = fCredentialsProvider.get(protocol);
    if (credentialsProvider == null)
      throw new CredentialsException(Activator.getDefault().createErrorStatus(NLS.bind(Messages.ConnectionServiceImpl_ERROR_NO_CREDENTIAL_PROVIDER, protocol), null));

    return credentialsProvider;
  }
View Full Code Here

Examples of org.rssowl.core.connection.auth.CredentialsException

      credMap.put(DOMAIN, credentials.getDomain());

    try {
      Platform.addAuthorizationInfo(url, REALM, SCHEME, credMap);
    } catch (CoreException e) {
      throw new CredentialsException(e.getStatus());
    }
  }
View Full Code Here

Examples of org.rssowl.core.connection.auth.CredentialsException

      credMap.put(DOMAIN, credentials.getDomain());

    try {
      Platform.addAuthorizationInfo(PROXY_IDENTIFIER, REALM, SCHEME, credMap);
    } catch (CoreException e) {
      throw new CredentialsException(e.getStatus());
    }
  }
View Full Code Here

Examples of org.rssowl.core.connection.auth.CredentialsException

   */
  public void deleteAuthCredentials(URL url) throws CredentialsException {
    try {
      Platform.flushAuthorizationInfo(url, REALM, SCHEME);
    } catch (CoreException e) {
      throw new CredentialsException(e.getStatus());
    }
  }
View Full Code Here

Examples of org.rssowl.core.connection.auth.CredentialsException

   */
  public void deleteProxyCredentials(URL url) throws CredentialsException {
    try {
      Platform.flushAuthorizationInfo(PROXY_IDENTIFIER, REALM, SCHEME);
    } catch (CoreException e) {
      throw new CredentialsException(e.getStatus());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.