Package com.nimbusds.jose
Class JOSEObjectType
- java.lang.Object
-
- com.nimbusds.jose.JOSEObjectType
-
- All Implemented Interfaces:
java.io.Serializable
@Immutable public final class JOSEObjectType extends java.lang.Object implements java.io.SerializableJOSE 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(java.lang.String type)Creates a new JOSE object type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)OverridesObject.equals().java.lang.StringgetType()Gets the JOSE object type.inthashCode()OverridesObject.hashCode().java.lang.StringtoJSONString()Returns the JSON string representation of this JOSE object type.java.lang.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.
-
-
Method Detail
-
getType
public java.lang.String getType()
Gets the JOSE object type.- Returns:
- The JOSE object type.
-
hashCode
public int hashCode()
OverridesObject.hashCode().- Overrides:
hashCodein classjava.lang.Object- Returns:
- The object hash code.
-
equals
public boolean equals(java.lang.Object object)
OverridesObject.equals().- Overrides:
equalsin classjava.lang.Object- Parameters:
object- The object to compare to.- Returns:
trueif the objects have the same value, otherwisefalse.
-
toString
public java.lang.String toString()
Returns the string representation of this JOSE object type.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation.
- See Also:
getType()
-
toJSONString
public java.lang.String toJSONString()
Returns the JSON string representation of this JOSE object type.- Returns:
- The JSON string representation.
-
-