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 thetypheader 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 JOSEObjectTypeJOSECompact encoded JOSE object type.static JOSEObjectTypeJOSE_JSONJSON-encoded JOSE object type..static JOSEObjectTypeJWTJSON 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 booleanequals(Object object)OverridesObject.equals().StringgetType()Gets the JOSE object type.inthashCode()OverridesObject.hashCode().StringtoJSONString()Returns the JSON string representation of this JOSE object type.StringtoString()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.
-
-