All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm Maven / Gradle / Ivy

Go to download

This library has been replaced by new Azure SDKs, you can read about them at https://aka.ms/azsdkvalueprop. The latest libraries to interact with the Azure Key Vault service are: (1) https://search.maven.org/artifact/com.azure/azure-security-keyvault-keys. (2) https://search.maven.org/artifact/com.azure/azure-security-keyvault-secrets. (3) https://search.maven.org/artifact/com.azure/azure-security-keyvault-certificates. It is recommended that you move to the new package.

There is a newer version: 1.2.6
Show newest version
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 */

package com.microsoft.azure.keyvault.webkey;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * Defines values for JsonWebKeySignatureAlgorithm.
 */
public final class JsonWebKeySignatureAlgorithm {
    /** Static value RS256 for JsonWebKeySignatureAlgorithm. */
    public static final JsonWebKeySignatureAlgorithm RS256 = new JsonWebKeySignatureAlgorithm("RS256");

    /** Static value RS384 for JsonWebKeySignatureAlgorithm. */
    public static final JsonWebKeySignatureAlgorithm RS384 = new JsonWebKeySignatureAlgorithm("RS384");

    /** Static value RS512 for JsonWebKeySignatureAlgorithm. */
    public static final JsonWebKeySignatureAlgorithm RS512 = new JsonWebKeySignatureAlgorithm("RS512");

    /** Static value RSNULL for JsonWebKeySignatureAlgorithm. */
    public static final JsonWebKeySignatureAlgorithm RSNULL = new JsonWebKeySignatureAlgorithm("RSNULL");

    private String value;

    /**
     * Creates a custom value for JsonWebKeySignatureAlgorithm.
     * @param value the custom value
     */
    public JsonWebKeySignatureAlgorithm(String value) {
        this.value = value;
    }

    @JsonValue
    @Override
    public String toString() {
        return value;
    }

    @Override
    public int hashCode() {
        return value.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof JsonWebKeySignatureAlgorithm)) {
            return false;
        }
        if (obj == this) {
            return true;
        }
        JsonWebKeySignatureAlgorithm rhs = (JsonWebKeySignatureAlgorithm) obj;
        if (value == null) {
            return rhs.value == null;
        } else {
            return value.equals(rhs.value);
        }
    }
    
    /**
     * All the JWK signature algorithms.
     */
    public static final List ALL_ALGORITHMS =
            Collections.unmodifiableList(Arrays.asList(RS256, RS384, RS512, RSNULL));
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy