Class OttAuthenticationConverter

java.lang.Object
com.irurueta.authserver.authorization.api.web.ott.OttAuthenticationConverter
All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationConverter

public class OttAuthenticationConverter extends Object implements org.springframework.security.web.authentication.AuthenticationConverter
Reads what is posted to POST /login/ott: the token field holds either the token of a magic link (a UUID, which OttLinkAuthenticationProvider consumes) or the numeric code of an e-mail or SMS, which is tied to the identifier and the binding id the session of the browser holds. A code posted from a browser that requested none is still converted (with an empty identifier), so the provider rejects it like any wrong code instead of the filter ignoring the request.
  • Field Details

    • TOKEN_PARAMETER

      public static final String TOKEN_PARAMETER
      Name of the field that holds the token or the code.
      See Also:
  • Constructor Details

    • OttAuthenticationConverter

      public OttAuthenticationConverter()
  • Method Details

    • convert

      public org.springframework.security.core.Authentication convert(jakarta.servlet.http.HttpServletRequest request)
      Converts the post.
      Specified by:
      convert in interface org.springframework.security.web.authentication.AuthenticationConverter
      Parameters:
      request - the request.
      Returns:
      the request to verify, or null when no token was posted.