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

io.scalecube.security.tokens.jwt.JwkInfo Maven / Gradle / Ivy

There is a newer version: 1.0.33.rc1
Show newest version
package io.scalecube.security.tokens.jwt;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.StringJoiner;

public class JwkInfo {

  private String use;
  private String kty;
  private String kid;
  private String alg;

  @JsonProperty("n")
  private String modulus; // n

  @JsonProperty("e")
  private String exponent; // e

  public JwkInfo() {}

  /**
   * Constructor.
   *
   * @param use use
   * @param kty kty
   * @param kid kid
   * @param alg alg
   * @param modulus modulus
   * @param exponent exponent
   */
  public JwkInfo(String use, String kty, String kid, String alg, String modulus, String exponent) {
    this.use = use;
    this.kty = kty;
    this.kid = kid;
    this.alg = alg;
    this.modulus = modulus;
    this.exponent = exponent;
  }

  public String use() {
    return use;
  }

  public String kty() {
    return kty;
  }

  public String kid() {
    return kid;
  }

  public String alg() {
    return alg;
  }

  public String modulus() {
    return modulus;
  }

  public String exponent() {
    return exponent;
  }

  @Override
  public String toString() {
    return new StringJoiner(", ", JwkInfo.class.getSimpleName() + "[", "]")
        .add("use='" + use + "'")
        .add("kty='" + kty + "'")
        .add("kid='" + kid + "'")
        .add("alg='" + alg + "'")
        .add("n='" + modulus + "'")
        .add("e='" + exponent + "'")
        .toString();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy