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

bluecrystal.service.jwt.AppAlgorithm Maven / Gradle / Ivy

There is a newer version: 1.16.0
Show newest version
package bluecrystal.service.jwt;

import com.auth0.jwt.JWTAlgorithmException;

public enum AppAlgorithm {

	HS256("HmacSHA256"), HS384("HmacSHA384"), HS512("HmacSHA512"), RS256("SHA256withRSA"), RS384(
			"SHA384withRSA"), RS512("SHA512withRSA");

	private AppAlgorithm(final String value) {
			this.value = value;
		}

	private String value;

	public String getValue() {
		return value;
	}

	public static AppAlgorithm findByName(final String name) throws JWTAlgorithmException {
		try {
			return AppAlgorithm.valueOf(name);
		} catch (IllegalArgumentException e) {
			throw new JWTAlgorithmException("Unsupported algorithm: " + name);
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy