org.apache.sling.auth.openid

## Enum OpenIDFailure

- java.lang.Object
- - java.lang.Enum<OpenIDFailure>
  - - org.apache.sling.auth.openid.OpenIDFailure

All Implemented Interfaces:
  Serializable, Comparable<OpenIDFailure>

    public enum OpenIDFailure
    extends Enum<OpenIDFailure>

The `OpenIDFailure` defines the OpenID authentication failure codes which may be set as the ``j_reason`` request parameter for the login form.

Note that the ``j_reason`` request attribute provides the name of the constant, which can be converted to the actual constant by calling the `OpenIDFailure.valueOf(String)` method. Internationalization is not built into the OpenID authentication handler. Providers of login forms should implement their own mechanism and may either use the constant name or the `message` of the constant as a key for translation.

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`ASSOCIATION` Indicates failure to associate with the OpenID provider to validate the identifier.
`AUTHENTICATION` Indicates failure of the user to authenticate with the OpenID Provider.
`COMMUNICATION` Indicates a generic communication problem with the OpenID Provider.
`DISCOVERY` Indicates failure to discover an OpenID Provider for the supplied OpenID identifier.
`OTHER` Indicates any other failure during authentication which is not captured by the other failure reasons.
`REPOSITORY` Indicates failure to find a matching Repository user for the supplied OpenID identifier.
`VERIFICATION` Indicates failure of the verification of the supplied authentication information with the OpenID Provider.

### Method Summary

Methods
`String` `toString()` Returns the message set when constructing this instance.
`static OpenIDFailure` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static OpenIDFailure[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### DISCOVERY

    public static final OpenIDFailure DISCOVERY

Indicates failure to discover an OpenID Provider for the supplied OpenID identifier.

#### ASSOCIATION

    public static final OpenIDFailure ASSOCIATION

Indicates failure to associate with the OpenID provider to validate the identifier.

#### COMMUNICATION

    public static final OpenIDFailure COMMUNICATION

Indicates a generic communication problem with the OpenID Provider.

#### AUTHENTICATION

    public static final OpenIDFailure AUTHENTICATION

Indicates failure of the user to authenticate with the OpenID Provider.

#### VERIFICATION

    public static final OpenIDFailure VERIFICATION

Indicates failure of the verification of the supplied authentication information with the OpenID Provider.

#### REPOSITORY

    public static final OpenIDFailure REPOSITORY

Indicates failure to find a matching Repository user for the supplied OpenID identifier.

#### OTHER

    public static final OpenIDFailure OTHER

Indicates any other failure during authentication which is not captured by the other failure reasons.

### Method Detail

#### values

    public static OpenIDFailure[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (OpenIDFailure c : OpenIDFailure.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static OpenIDFailure valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

#### toString

    public String toString()

Returns the message set when constructing this instance. To get the official name call the `name()` method.

Overrides:
  `toString` in class `Enum<OpenIDFailure>`