io.jsonwebtoken.Identifiable Maven / Gradle / Ivy
/*
* Copyright (C) 2021 jsonwebtoken.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.jsonwebtoken;
/**
* An object that may be uniquely identified by an {@link #getId() id} relative to other instances of the same type.
*
* The following table indicates how various JWT or JWK {@link #getId() getId()} values are used.
*
*
* JWA Identifiable Concepts
*
*
* JJWT Type
* How {@link #getId()} is Used
*
*
*
*
* {@link io.jsonwebtoken.Claims Claims}
* JWT's {@code jti} (JWT ID)
* claim.
*
*
* {@link io.jsonwebtoken.security.Jwk Jwk}
* JWK's {@code kid} (Key ID)
* parameter value.
*
*
* {@link io.jsonwebtoken.security.Curve Curve}
* JWK's {@code crv} (Curve)
* parameter value.
*
*
* {@link io.jsonwebtoken.io.CompressionAlgorithm CompressionAlgorithm}
* JWE protected header's
* {@code zip} (Compression Algorithm)
* parameter value.
*
*
* {@link io.jsonwebtoken.security.HashAlgorithm HashAlgorithm}
* Within a {@link io.jsonwebtoken.security.JwkThumbprint JwkThumbprint}'s URI value.
*
*
* {@link io.jsonwebtoken.security.MacAlgorithm MacAlgorithm}
* JWS protected header's
* {@code alg} (Algorithm) parameter value.
*
*
* {@link io.jsonwebtoken.security.SignatureAlgorithm SignatureAlgorithm}
* JWS protected header's
* {@code alg} (Algorithm) parameter value.
*
*
* {@link io.jsonwebtoken.security.KeyAlgorithm KeyAlgorithm}
* JWE protected header's
* {@code alg} (Key Management Algorithm)
* parameter value.
*
*
* {@link io.jsonwebtoken.security.AeadAlgorithm AeadAlgorithm}
* JWE protected header's
* {@code enc} (Encryption Algorithm)
* parameter value.
*
*
*
*
* @since 0.12.0
*/
public interface Identifiable {
/**
* Returns the unique string identifier of the associated object.
*
* @return the unique string identifier of the associated object.
*/
String getId();
}