Package com.nimbusds.jose
Class JOSEObjectType
- java.lang.Object
-
- com.nimbusds.jose.JOSEObjectType
-
- All Implemented Interfaces:
Serializable
@Immutable public final class JOSEObjectType extends Object implements Serializable
JOSE object type, represents thetyp
header parameter in unsecured, JSON Web Signature (JWS) and JSON Web Encryption (JWE) objects. This class is immutable.Includes constants for the following standard types:
Additional types can be defined using the constructor.
- Version:
- 2021-04-06
- Author:
- Vladimir Dzhuvinov
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static JOSEObjectType
JOSE
Compact encoded JOSE object type.static JOSEObjectType
JOSE_JSON
JSON-encoded JOSE object type..static JOSEObjectType
JWT
JSON Web Token (JWT) object type.
-
Constructor Summary
Constructors Constructor Description JOSEObjectType(String type)
Creates a new JOSE object type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
OverridesObject.equals()
.String
getType()
Gets the JOSE object type.int
hashCode()
OverridesObject.hashCode()
.String
toJSONString()
Returns the JSON string representation of this JOSE object type.String
toString()
Returns the string representation of this JOSE object type.
-
-
-
Field Detail
-
JOSE
public static final JOSEObjectType JOSE
Compact encoded JOSE object type.
-
JOSE_JSON
public static final JOSEObjectType JOSE_JSON
JSON-encoded JOSE object type..
-
JWT
public static final JOSEObjectType JWT
JSON Web Token (JWT) object type.
-
-
Constructor Detail
-
JOSEObjectType
public JOSEObjectType(String type)
Creates a new JOSE object type.- Parameters:
type
- The object type. Must not benull
.
-
-
Method Detail
-
hashCode
public int hashCode()
OverridesObject.hashCode()
.
-
toJSONString
public String toJSONString()
Returns the JSON string representation of this JOSE object type.- Returns:
- The JSON string representation.
-
-