Interface RestHttpRequestCredentialFactory

  • All Superinterfaces:
    org.springframework.core.Ordered
    All Known Implementing Classes:
    ChainingRestHttpRequestCredentialFactory, UsernamePasswordRestHttpRequestCredentialFactory
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface RestHttpRequestCredentialFactory
    extends org.springframework.core.Ordered
    Strategy interface for enabling plug-in point for constructing Credential instances from HTTP request body.
    Since:
    4.2.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PARAMETER_PASSWORD
      Password parameter.
      static java.lang.String PARAMETER_USERNAME
      Username parameter.
      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.util.List<org.apereo.cas.authentication.Credential> fromAuthentication​(javax.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String> requestBody, org.apereo.cas.authentication.Authentication authentication, org.apereo.cas.authentication.MultifactorAuthenticationProvider provider)
      From authentication.
      java.util.List<org.apereo.cas.authentication.Credential> fromRequest​(javax.servlet.http.HttpServletRequest request, org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String> requestBody)
      Create new Credential instances from HTTP request or requestBody.
      default int getOrder()  
    • Field Detail

      • PARAMETER_USERNAME

        static final java.lang.String PARAMETER_USERNAME
        Username parameter.
        See Also:
        Constant Field Values
      • PARAMETER_PASSWORD

        static final java.lang.String PARAMETER_PASSWORD
        Password parameter.
        See Also:
        Constant Field Values
    • Method Detail

      • fromRequest

        java.util.List<org.apereo.cas.authentication.Credential> fromRequest​(javax.servlet.http.HttpServletRequest request,
                                                                             org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String> requestBody)
        Create new Credential instances from HTTP request or requestBody.
        Parameters:
        request - object to extract credentials from
        requestBody - multipart/form-data request body to extract credentials from
        Returns:
        Credential instance(s)
      • getOrder

        default int getOrder()
        Specified by:
        getOrder in interface org.springframework.core.Ordered
      • fromAuthentication

        default java.util.List<org.apereo.cas.authentication.Credential> fromAuthentication​(javax.servlet.http.HttpServletRequest request,
                                                                                            org.springframework.util.MultiValueMap<java.lang.String,​java.lang.String> requestBody,
                                                                                            org.apereo.cas.authentication.Authentication authentication,
                                                                                            org.apereo.cas.authentication.MultifactorAuthenticationProvider provider)
        From authentication.
        Parameters:
        request - the request
        requestBody - the request body
        authentication - the authn
        provider - the provider
        Returns:
        the list