All Known Implementing Classes:
DefaultStateFactory

@DefaultImplementation(DefaultStateFactory.class) public interface StateFactory
Generates a state parameter. Auth Request state parameter state: Opaque value used to maintain state between the request and the callback. Typically, Cross-Site Request Forgery (CSRF, XSRF) mitigation is done by cryptographically binding the value of this parameter with a browser cookie.
Since:
1.2.0
Author:
Sergio del Amo
  • Method Summary

    Modifier and Type
    Method
    Description
    buildState(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response, @Nullable AuthorizationRequest authorizationRequest)
     
  • Method Details

    • buildState

      String buildState(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response, @Nullable @Nullable AuthorizationRequest authorizationRequest)
      Parameters:
      request - The original request prior redirect
      response - The authorization redirect response
      authorizationRequest - the AuthorizationRequest
      Returns:
      A state parameter. An opaque value used to maintain state between the request and the callback.