Class HttpAuthenticationProvider

java.lang.Object
io.goobi.viewer.model.security.authentication.HttpAuthenticationProvider
All Implemented Interfaces:
IAuthenticationProvider
Direct Known Subclasses:
BibliothecaProvider, HttpHeaderProvider, LitteraProvider, OpenIdProvider, VuFindProvider

public abstract class HttpAuthenticationProvider extends Object implements IAuthenticationProvider

Abstract HttpAuthenticationProvider class.

Author:
Florian Alpers
  • Field Details

    • DEFAULT_EMAIL

      protected static final String DEFAULT_EMAIL
      Constant DEFAULT_EMAIL="{username}@nomail.com"
      See Also:
    • TYPE_USER_PASSWORD

      protected static final String TYPE_USER_PASSWORD
      Constant TYPE_USER_PASSWORD="userPassword"
      See Also:
    • connectionManager

      protected static org.apache.http.impl.conn.PoolingHttpClientConnectionManager connectionManager
      Constant connectionManager
    • name

      protected final String name
    • label

      protected final String label
    • type

      protected final String type
    • url

      protected final String url
    • image

      protected final String image
    • timeoutMillis

      protected final long timeoutMillis
    • addUserToGroups

      protected List<String> addUserToGroups
    • redirectUrl

      protected String redirectUrl
      URL to redirect to after successful login.
  • Constructor Details

    • HttpAuthenticationProvider

      protected HttpAuthenticationProvider(String name, String label, String type, String url, String image, long timeoutMillis)

      Constructor for HttpAuthenticationProvider.

      Parameters:
      name - a String object.
      label - a String object.
      url - a String object.
      image - a String object.
      type - a String object.
      timeoutMillis - a long.
  • Method Details

    • getTimeoutMillis

      public long getTimeoutMillis()

      Getter for the field timeoutMillis.

      Returns:
      the timeoutMillis
    • getName

      public String getName()
      Returns an unique name for the authentication provider implementation
      Specified by:
      getName in interface IAuthenticationProvider
      Returns:
      The name of the provider
    • getLabel

      public String getLabel()

      Getter for the field label.

      Returns:
      the label
    • getUrl

      public String getUrl()

      Getter for the field url.

      Returns:
      the url
    • getImage

      public String getImage()

      Getter for the field image.

      Returns:
      the image
    • getImageUrl

      public String getImageUrl()

      getImageUrl.

      Returns:
      a String object.
    • getType

      public String getType()
      The provider type. This should either be "local", "userpassword" or "openId". This value is used to determine where this provider is displayed. Providers with the same type are displayed together
      Specified by:
      getType in interface IAuthenticationProvider
      Returns:
      The type of the provider
    • getAddUserToGroups

      public List<String> getAddUserToGroups()

      getAddUserToGroups.

      Specified by:
      getAddUserToGroups in interface IAuthenticationProvider
      Returns:
      a List object.
    • setAddUserToGroups

      public void setAddUserToGroups(List<String> addUserToGroups)

      setAddUserToGroups.

      Specified by:
      setAddUserToGroups in interface IAuthenticationProvider
      Parameters:
      addUserToGroups - a List object.
    • getRedirectUrl

      public String getRedirectUrl()
      Specified by:
      getRedirectUrl in interface IAuthenticationProvider
      Returns:
      the redirectUrl
    • setRedirectUrl

      public void setRedirectUrl(String redirectUrl)
      Specified by:
      setRedirectUrl in interface IAuthenticationProvider
      Parameters:
      redirectUrl - the redirectUrl to set
    • post

      protected String post(URI url, String requestEntity) throws javax.ws.rs.WebApplicationException

      post.

      Parameters:
      url - a URI object.
      requestEntity - a String object.
      Returns:
      a String object.
      Throws:
      javax.ws.rs.WebApplicationException - if any.
    • get

      protected String get(URI url) throws javax.ws.rs.WebApplicationException

      get.

      Parameters:
      url - a URI object.
      Returns:
      a String object.
      Throws:
      javax.ws.rs.WebApplicationException - if any.