Class Token

java.lang.Object
com.authlete.http.Token
All Implemented Interfaces:
Serializable

public class Token extends Object implements Serializable
This class represents the token as defined in RFC 9110: HTTP Semantics, Section 5.6.2. Tokens.

Definition

 token = 1*tchar

 tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
       / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
       / DIGIT / ALPHA
       ; any VCHAR, except delimiters
 

Sample Code

 // Parse the string as a token.
 Token token = Token.parse("token");

 // The getValue() method returns the raw value of the token.
 assertEquals("token", token.getValue());
 
See Also: