Class RsaTokenKey
- java.lang.Object
-
- com.azure.resourcemanager.videoanalyzer.models.TokenKey
-
- com.azure.resourcemanager.videoanalyzer.models.RsaTokenKey
-
public final class RsaTokenKey extends TokenKey
Required validation properties for tokens generated with RSA algorithm.
-
-
Constructor Summary
Constructors Constructor Description RsaTokenKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessPolicyRsaAlgoalg()Get the alg property: RSA algorithm to be used: RS256, RS384 or RS512.Stringe()Get the e property: RSA public key exponent.Stringn()Get the n property: RSA public key modulus.voidvalidate()Validates the instance.RsaTokenKeywithAlg(AccessPolicyRsaAlgo alg)Set the alg property: RSA algorithm to be used: RS256, RS384 or RS512.RsaTokenKeywithE(String e)Set the e property: RSA public key exponent.RsaTokenKeywithKid(String kid)Set the kid property: JWT token key id.RsaTokenKeywithN(String n)Set the n property: RSA public key modulus.
-
-
-
Method Detail
-
alg
public AccessPolicyRsaAlgo alg()
Get the alg property: RSA algorithm to be used: RS256, RS384 or RS512.- Returns:
- the alg value.
-
withAlg
public RsaTokenKey withAlg(AccessPolicyRsaAlgo alg)
Set the alg property: RSA algorithm to be used: RS256, RS384 or RS512.- Parameters:
alg- the alg value to set.- Returns:
- the RsaTokenKey object itself.
-
n
public String n()
Get the n property: RSA public key modulus.- Returns:
- the n value.
-
withN
public RsaTokenKey withN(String n)
Set the n property: RSA public key modulus.- Parameters:
n- the n value to set.- Returns:
- the RsaTokenKey object itself.
-
e
public String e()
Get the e property: RSA public key exponent.- Returns:
- the e value.
-
withE
public RsaTokenKey withE(String e)
Set the e property: RSA public key exponent.- Parameters:
e- the e value to set.- Returns:
- the RsaTokenKey object itself.
-
withKid
public RsaTokenKey withKid(String kid)
Set the kid property: JWT token key id. Validation keys are looked up based on the key id present on the JWT token header.
-
validate
public void validate()
Validates the instance.- Overrides:
validatein classTokenKey- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-