|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.oauth2.sdk.id.Identifier com.nimbusds.oauth2.sdk.id.State
@Immutable public final class State
Opaque value used to maintain state between a request and a callback. Also serves as a protection against XSRF attacks, among other uses. This class is immutable.
Field Summary |
---|
Fields inherited from class com.nimbusds.oauth2.sdk.id.Identifier |
---|
DEFAULT_BYTE_LENGTH |
Constructor Summary | |
---|---|
State()
Creates a new state with a randomly generated value. |
|
State(int length)
Creates a new state with a randomly generated value of the specified length. |
|
State(String value)
Creates a new state with the specified value. |
Method Summary | |
---|---|
boolean |
equals(Object object)
Overrides Object.equals() . |
static State |
parse(String s)
Parses a state from the specified string. |
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier |
---|
getValue, hashCode, toJSONString, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public State(String value)
value
- The state value. Must not be null
or empty
string.public State(int length)
length
- The number of characters. Must be a positive integer.public State()
Method Detail |
---|
public boolean equals(Object object)
Identifier
Object.equals()
.
equals
in class Identifier
object
- The object to compare to.
true
if the objects have the same value, otherwise
false
.public static State parse(String s)
s
- The string to parse, null
or empty if no state is
specified.
null
if the parsed string was
null
or empty.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |