org.apache.sling.auth.selector

## Class SelectorAuthenticationHandler

- java.lang.Object
- - org.apache.sling.auth.core.spi.DefaultAuthenticationFeedbackHandler
  - - org.apache.sling.auth.core.spi.AbstractAuthenticationHandler
    - - org.apache.sling.auth.selector.SelectorAuthenticationHandler

All Implemented Interfaces:
  org.apache.sling.auth.core.spi.AuthenticationFeedbackHandler, org.apache.sling.auth.core.spi.AuthenticationHandler

    @Properties(value={@Property(name="service.description",value="Apache Sling Selector Form Handler"),@Property(name="service.vendor",value="The Apache Software Foundation"),@Property(name="path",value="/"),@Property(name="service.ranking",intValue=5000)})
    @Service
    public class SelectorAuthenticationHandler
    extends org.apache.sling.auth.core.spi.AbstractAuthenticationHandler

The `SelectorAuthenticationHandler` is a pseudo authentication handler which only implements the `requestCredentials(HttpServletRequest, HttpServletResponse)` method to cause an input form to be rendered for the client to be able to provide credentials.

The default form provided by this handler allows the client to choose from Form Based and OpenID authentication.

### Field Summary

### Fields inherited from interface org.apache.sling.auth.core.spi.AuthenticationHandler

`FAILURE_REASON, PATH_PROPERTY, REQUEST_LOGIN_PARAMETER, SERVICE_NAME, TYPE_PROPERTY`

### Constructor Summary

Constructors
Constructor and Description
`SelectorAuthenticationHandler()`

### Method Summary

Methods
`void` `dropCredentials(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Nothing to do, this handler does not manage concrete credentials
`org.apache.sling.auth.core.spi.AuthenticationInfo` `extractCredentials(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Always returns `null` because this handler cannot provide credentials from the request.
`boolean` `requestCredentials(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`

### Methods inherited from class org.apache.sling.auth.core.spi.AbstractAuthenticationHandler

`getAttributeOrParameter, getLoginResource, isRedirectValid, isValidateRequest, sendInvalid, sendRedirect, sendValid, setLoginResourceAttribute`

### Methods inherited from class org.apache.sling.auth.core.spi.DefaultAuthenticationFeedbackHandler

`authenticationFailed, authenticationSucceeded, handleRedirect`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SelectorAuthenticationHandler

    public SelectorAuthenticationHandler()

### Method Detail

#### extractCredentials

    public org.apache.sling.auth.core.spi.AuthenticationInfo extractCredentials(javax.servlet.http.HttpServletRequest request,
                                                                       javax.servlet.http.HttpServletResponse response)

Always returns `null` because this handler cannot provide credentials from the request.

#### requestCredentials

    public boolean requestCredentials(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)

#### dropCredentials

    public void dropCredentials(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)

Nothing to do, this handler does not manage concrete credentials