com.nimbusds.openid.connect.sdk
Class Prompt

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<E>
          extended by java.util.HashSet<Prompt.Type>
              extended by com.nimbusds.openid.connect.sdk.Prompt
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Prompt.Type>, Collection<Prompt.Type>, Set<Prompt.Type>

@NotThreadSafe
public class Prompt
extends HashSet<Prompt.Type>

Prompts for end-user re-authentication and consent. This class is not thread-safe.

Related specifications:

Author:
Vladimir Dzhuvinov
See Also:
Serialized Form

Nested Class Summary
static class Prompt.Type
          Enumeration of the prompt types.
 
Constructor Summary
Prompt()
          Creates a new empty prompt set.
 
Method Summary
 boolean isValid()
          Checks if the prompt set is valid.
static Prompt parse(String s)
          Parses a prompt set from the specified string.
 String toString()
          Returns the string representation of this prompt set.
 
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

Prompt

public Prompt()
Creates a new empty prompt set.

Method Detail

isValid

public boolean isValid()
Checks if the prompt set is valid. This is done by examining the set for a conflicting Prompt.Type.NONE value.

Returns:
true if this prompt set if valid, else false.

toString

public String toString()
Returns the string representation of this prompt set. The values are delimited by space.

Example:

 login consent
 

Overrides:
toString in class AbstractCollection<Prompt.Type>
Returns:
The string representation of this scope.

parse

public static Prompt parse(String s)
                    throws ParseException
Parses a prompt set from the specified string.

Parameters:
s - The string to parse, with one or more non-conflicting space delimited prompt types. May be null.
Returns:
The prompt set, null if the parsed string was null or empty.
Throws:
ParseException - If the string couldn't be parsed to a valid prompt set.


Copyright © 2013 NimbusDS. All Rights Reserved.