Class ComponentIdentifier
java.lang.Object
com.authlete.hms.ComponentIdentifier
A class representing a component identifier.
RFC 9421 HTTP Message Signatures, Section 1.1. Conventions and Terminology, explains HTTP Message Component Identifier as follows:
The combination of an HTTP message component name and any parameters. This combination uniquely identifies a specific HTTP message component with respect to a particular HTTP message signature and the HTTP message it applies to.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionComponentIdentifier
(String componentName) A constructor with a component name.ComponentIdentifier
(String componentName, ComponentIdentifierParameters parameters) A constructor with a component name and parameters. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the component name.Get the parameters which are part of this component identifier.int
hashCode()
boolean
Get the flag indicating that the component name of this component identifier refers to a derived component.Serialize the component identifier represented by this instance, and return the resulting string.Serialize the component identifier represented by this instance, and write the resulting string into the specified string builder.toString()
Get the string representation of this instance, which is the serialized component identifier returned by theserialize()
method.
-
Constructor Details
-
ComponentIdentifier
A constructor with a component name.- Parameters:
componentName
- A component name.- Throws:
IllegalArgumentException
- The component name is null.
-
ComponentIdentifier
A constructor with a component name and parameters.- Parameters:
componentName
- A component name.parameters
- Parameters.- Throws:
IllegalArgumentException
- The component name is null.
-
-
Method Details
-
equals
-
hashCode
-
toString
Get the string representation of this instance, which is the serialized component identifier returned by theserialize()
method. -
serialize
Serialize the component identifier represented by this instance, and return the resulting string.- Returns:
- The serialized component identifier represented by this instance.
-
serializeTo
Serialize the component identifier represented by this instance, and write the resulting string into the specified string builder.- Parameters:
sb
- A string builder into which the resulting string is written.- Returns:
- The same string builder that was passed as the argument.
-
getComponentName
-
getParameters
Get the parameters which are part of this component identifier.- Returns:
- The parameters.
-
isDerivedComponent
public boolean isDerivedComponent()Get the flag indicating that the component name of this component identifier refers to a derived component.- Returns:
- True if the component name refers to a derived component.
In other words, true if the component name starts with
"@"
.
-