Tabnine Logo
UnsupportedTokenException
Code IndexAdd Tabnine to your IDE (free)

How to use
UnsupportedTokenException
in
org.apache.shiro.authc.pam

Best Java code snippets using org.apache.shiro.authc.pam.UnsupportedTokenException (Showing top 9 results out of 315)

origin: apache/shiro

/**
 * Because all realms in this strategy must complete successfully, this implementation ensures that the given
 * <code>Realm</code> {@link org.apache.shiro.realm.Realm#supports(org.apache.shiro.authc.AuthenticationToken) supports} the given
 * <code>token</code> argument.  If it does not, this method throws an
 * {@link UnsupportedTokenException UnsupportedTokenException} to end the authentication
 * process immediately. If the realm does support the token, the <code>info</code> argument is returned immediately.
 */
public AuthenticationInfo beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo info) throws AuthenticationException {
  if (!realm.supports(token)) {
    String msg = "Realm [" + realm + "] of type [" + realm.getClass().getName() + "] does not support " +
        " the submitted AuthenticationToken [" + token + "].  The [" + getClass().getName() +
        "] implementation requires all configured realm(s) to support and be able to process the submitted " +
        "AuthenticationToken.";
    throw new UnsupportedTokenException(msg);
  }
  return info;
}
origin: org.neo4j/neo4j-security-enterprise

securityLog.error( "Unknown user failed to log in: %s", e.getMessage() );
Throwable cause = e.getCause();
if ( cause != null && cause instanceof InvalidAuthTokenException )
origin: apache/shiro

/**
 * Performs the authentication attempt by interacting with the single configured realm, which is significantly
 * simpler than performing multi-realm logic.
 *
 * @param realm the realm to consult for AuthenticationInfo.
 * @param token the submitted AuthenticationToken representing the subject's (user's) log-in principals and credentials.
 * @return the AuthenticationInfo associated with the user account corresponding to the specified {@code token}
 */
protected AuthenticationInfo doSingleRealmAuthentication(Realm realm, AuthenticationToken token) {
  if (!realm.supports(token)) {
    String msg = "Realm [" + realm + "] does not support authentication token [" +
        token + "].  Please ensure that the appropriate Realm implementation is " +
        "configured correctly or that the realm accepts AuthenticationTokens of this type.";
    throw new UnsupportedTokenException(msg);
  }
  AuthenticationInfo info = realm.getAuthenticationInfo(token);
  if (info == null) {
    String msg = "Realm [" + realm + "] was unable to find account data for the " +
        "submitted AuthenticationToken [" + token + "].";
    throw new UnknownAccountException(msg);
  }
  return info;
}
origin: org.apache.shiro/shiro-core

/**
 * Because all realms in this strategy must complete successfully, this implementation ensures that the given
 * <code>Realm</code> {@link org.apache.shiro.realm.Realm#supports(org.apache.shiro.authc.AuthenticationToken) supports} the given
 * <code>token</code> argument.  If it does not, this method throws an
 * {@link UnsupportedTokenException UnsupportedTokenException} to end the authentication
 * process immediately. If the realm does support the token, the <code>info</code> argument is returned immediately.
 */
public AuthenticationInfo beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo info) throws AuthenticationException {
  if (!realm.supports(token)) {
    String msg = "Realm [" + realm + "] of type [" + realm.getClass().getName() + "] does not support " +
        " the submitted AuthenticationToken [" + token + "].  The [" + getClass().getName() +
        "] implementation requires all configured realm(s) to support and be able to process the submitted " +
        "AuthenticationToken.";
    throw new UnsupportedTokenException(msg);
  }
  return info;
}
origin: org.apache.shiro/shiro-core

/**
 * Performs the authentication attempt by interacting with the single configured realm, which is significantly
 * simpler than performing multi-realm logic.
 *
 * @param realm the realm to consult for AuthenticationInfo.
 * @param token the submitted AuthenticationToken representing the subject's (user's) log-in principals and credentials.
 * @return the AuthenticationInfo associated with the user account corresponding to the specified {@code token}
 */
protected AuthenticationInfo doSingleRealmAuthentication(Realm realm, AuthenticationToken token) {
  if (!realm.supports(token)) {
    String msg = "Realm [" + realm + "] does not support authentication token [" +
        token + "].  Please ensure that the appropriate Realm implementation is " +
        "configured correctly or that the realm accepts AuthenticationTokens of this type.";
    throw new UnsupportedTokenException(msg);
  }
  AuthenticationInfo info = realm.getAuthenticationInfo(token);
  if (info == null) {
    String msg = "Realm [" + realm + "] was unable to find account data for the " +
        "submitted AuthenticationToken [" + token + "].";
    throw new UnknownAccountException(msg);
  }
  return info;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.shiro

/**
 * Because all realms in this strategy must complete successfully, this implementation ensures that the given
 * <code>Realm</code> {@link org.apache.shiro.realm.Realm#supports(org.apache.shiro.authc.AuthenticationToken) supports} the given
 * <code>token</code> argument.  If it does not, this method throws an
 * {@link UnsupportedTokenException UnsupportedTokenException} to end the authentication
 * process immediately. If the realm does support the token, the <code>info</code> argument is returned immediately.
 */
public AuthenticationInfo beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo info) throws AuthenticationException {
  if (!realm.supports(token)) {
    String msg = "Realm [" + realm + "] of type [" + realm.getClass().getName() + "] does not support " +
        " the submitted AuthenticationToken [" + token + "].  The [" + getClass().getName() +
        "] implementation requires all configured realm(s) to support and be able to process the submitted " +
        "AuthenticationToken.";
    throw new UnsupportedTokenException(msg);
  }
  return info;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.shiro

/**
 * Performs the authentication attempt by interacting with the single configured realm, which is significantly
 * simpler than performing multi-realm logic.
 *
 * @param realm the realm to consult for AuthenticationInfo.
 * @param token the submitted AuthenticationToken representing the subject's (user's) log-in principals and credentials.
 * @return the AuthenticationInfo associated with the user account corresponding to the specified {@code token}
 */
protected AuthenticationInfo doSingleRealmAuthentication(Realm realm, AuthenticationToken token) {
  if (!realm.supports(token)) {
    String msg = "Realm [" + realm + "] does not support authentication token [" +
        token + "].  Please ensure that the appropriate Realm implementation is " +
        "configured correctly or that the realm accepts AuthenticationTokens of this type.";
    throw new UnsupportedTokenException(msg);
  }
  AuthenticationInfo info = realm.getAuthenticationInfo(token);
  if (info == null) {
    String msg = "Realm [" + realm + "] was unable to find account data for the " +
        "submitted AuthenticationToken [" + token + "].";
    throw new UnknownAccountException(msg);
  }
  return info;
}
origin: org.seedstack.seed/seed-security-core

org.seedstack.seed.security.AuthenticationToken seedToken = convertToken(token);
if (seedToken == null) {
  throw new UnsupportedTokenException("The token " + token.getClass() + " is not supported");
  throw new UnknownAccountException(e);
} catch (org.seedstack.seed.security.UnsupportedTokenException e) {
  throw new UnsupportedTokenException(e);
} catch (org.seedstack.seed.security.AuthenticationException e) {
  throw new AuthenticationException(e);
origin: org.neo4j/neo4j-security-enterprise

throw new UnsupportedTokenException( e );
org.apache.shiro.authc.pamUnsupportedTokenException

Javadoc

Exception thrown during the authentication process when an org.apache.shiro.authc.AuthenticationToken implementation is encountered that is not supported by one or more configured org.apache.shiro.realm.Realms.

Most used methods

  • <init>
    Constructs a new UnsupportedTokenException.
  • getCause
  • getMessage

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JComboBox (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now