Class OpenIdPrompt


  • public class OpenIdPrompt
    extends Object
    Parses and validates the OpenId Connect prompt parameters.
    Since:
    12.0.0
    • Constructor Detail

      • OpenIdPrompt

        public OpenIdPrompt​(String prompt)
        Constructs a new OpenIdPrompt instance from the given prompt String.
        Parses the prompt string (converted to lowercase) by splitting on the ' ' character.
        Parameters:
        prompt - The prompt.
      • OpenIdPrompt

        public OpenIdPrompt​(OAuth2Request request)
        Constructs a new OpenIdPrompt instance directly from the request object by using the constant defined in OAuth2Constants and calling the existing constructor with the string obtained.
        Parameters:
        request - The request object
    • Method Detail

      • containsNone

        public boolean containsNone()
        Determines if the prompt contains 'none'.
        Returns:
        true if the prompt includes 'none'.
      • containsLogin

        public boolean containsLogin()
        Determines if the prompt contains 'login'.
        Returns:
        true if the prompt includes 'login'.
      • containsConsent

        public boolean containsConsent()
        Determines if the prompt contains 'consent'.
        Returns:
        true if the prompt includes 'consent'.
      • containsSelectAccount

        public boolean containsSelectAccount()
        Determines if the prompt contains 'select_account'.
        Returns:
        true if the prompt includes 'select_account'.
      • isValid

        public boolean isValid()
        Determines whether the prompt parameter is valid.
        Returns:
        false if the prompt includes 'none' combined with either 'consent' or 'login', or 'select_account'.
      • getOriginalValue

        public String getOriginalValue()
        Get to the original value passed in. This is in case we took the "invoke the constructor with the http request" route and may not have access to the value used.
        Returns:
        the original "prompt" value used to initialise this object