Created
July 27, 2020 07:29
-
-
Save balvinder294/0a75ac9c5a7fefbe29cee326df2d83de to your computer and use it in GitHub Desktop.
DTO for Handling Response for Public Key from Apple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.annotation.JsonProperty; | |
public final class ApplePublicKey { | |
private final String kty; | |
private final String kid; | |
private final String use; | |
private final String alg; | |
private final String n; | |
private final String e; | |
public ApplePublicKey(@JsonProperty("kty") String kty, | |
@JsonProperty("kid") String kid, | |
@JsonProperty("use") String use, | |
@JsonProperty("alg") String alg, | |
@JsonProperty("n") String n, | |
@JsonProperty("e") String e) { | |
this.kty = kty; | |
this.kid = kid; | |
this.use = use; | |
this.alg = alg; | |
this.n = n; | |
this.e = e; | |
} | |
public String getKty() { | |
return kty; | |
} | |
public String getKid() { | |
return kid; | |
} | |
public String getUse() { | |
return use; | |
} | |
public String getAlg() { | |
return alg; | |
} | |
public String getN() { | |
return n; | |
} | |
public String getE() { | |
return e; | |
} | |
@Override | |
public String toString() { | |
return "ApplePublicKey{" + | |
"kty='" + kty + '\'' + | |
", kid='" + kid + '\'' + | |
", use='" + use + '\'' + | |
", alg='" + alg + '\'' + | |
", n='" + n + '\'' + | |
", e='" + e + '\'' + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment