org.springframework.security.oauth2.provider.token.store.jwk.JwkAttributes Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-security-oauth2 Show documentation
Show all versions of spring-security-oauth2 Show documentation
Module for providing OAuth2 support to Spring Security
/*
* Copyright 2012-2017 the original author or authors.
*
* 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
*
* https://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 org.springframework.security.oauth2.provider.token.store.jwk;
/**
* Shared attribute values used by {@link JwkTokenStore} and associated collaborators.
*
* @author Joe Grandja
* @author Michael Duergner
*/
final class JwkAttributes {
/**
* The "kid" (key ID) parameter used in a JWT header and in a JWK.
*/
static final String KEY_ID = "kid";
/**
* The "kty" (key type) parameter identifies the cryptographic algorithm family
* used by a JWK, for example, "RSA" or "EC".
*/
static final String KEY_TYPE = "kty";
/**
* The "alg" (algorithm) parameter used in a JWT header and in a JWK.
*/
static final String ALGORITHM = "alg";
/**
* The "use" (public key use) parameter identifies the intended use of the public key.
* For example, whether a public key is used for encrypting data or verifying the signature on data.
*/
static final String PUBLIC_KEY_USE = "use";
/**
* The "n" (modulus) parameter contains the modulus value for a RSA public key.
*/
static final String RSA_PUBLIC_KEY_MODULUS = "n";
/**
* The "e" (exponent) parameter contains the exponent value for a RSA public key.
*/
static final String RSA_PUBLIC_KEY_EXPONENT = "e";
/**
* The "x" parameter contains the x value for a EC public key.
*/
static final String EC_PUBLIC_KEY_X = "x";
/**
* The "y" parameter contains the y value for a EC public key.
*/
static final String EC_PUBLIC_KEY_Y = "y";
/**
* The "crv" (curve) parameter contains the curve value for a EC public key.
*/
static final String EC_PUBLIC_KEY_CURVE = "crv";
/**
* A JWK Set is a JSON object that has a "keys" member
* and its value is an array (set) of JWKs.
*/
static final String KEYS = "keys";
}