Tabnine Logo
UnsupportedTokenException.<init>
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.apache.shiro.authc.pam.UnsupportedTokenException.<init> (Showing top 8 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: 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<init>

Javadoc

Creates a new UnsupportedTokenException.

Popular methods of UnsupportedTokenException

  • getCause
  • getMessage

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top Sublime Text plugins
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