Interface AuthorizationConsentPolicy


public interface AuthorizationConsentPolicy

Which authorizations the user must approve on a consent page before a code is issued, beyond the clients whose ClientSettings.isRequireAuthorizationConsent() already says so. Given to authorizationConsent(...) on the authorization server configurer.

The page lists the scopes asked for, and the grant carries exactly the ones the user left ticked -- never one the request did not ask for, nor one the client was not registered with. Consent is asked on every authorization that needs it; nothing is remembered between them.

  • Method Details

    • requiresConsent

      boolean requiresConsent(RegisteredClient client, Set<String> scopes, Authentication user)
      Parameters:
      client - the client asking
      scopes - the scopes it asked for, already checked against its registration
      user - who is signed in
      Returns:
      true to ask the user first