Class JwtAuthentication
- java.lang.Object
-
- com.azure.resourcemanager.videoanalyzer.models.AuthenticationBase
-
- com.azure.resourcemanager.videoanalyzer.models.JwtAuthentication
-
public final class JwtAuthentication extends AuthenticationBase
Properties for access validation based on JSON Web Tokens (JWT).
-
-
Constructor Summary
Constructors Constructor Description JwtAuthentication()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
audiences()
Get the audiences property: List of expected token audiences.List<TokenClaim>
claims()
Get the claims property: List of additional token claims to be validated.List<String>
issuers()
Get the issuers property: List of expected token issuers.List<TokenKey>
keys()
Get the keys property: List of keys which can be used to validate access tokens.void
validate()
Validates the instance.JwtAuthentication
withAudiences(List<String> audiences)
Set the audiences property: List of expected token audiences.JwtAuthentication
withClaims(List<TokenClaim> claims)
Set the claims property: List of additional token claims to be validated.JwtAuthentication
withIssuers(List<String> issuers)
Set the issuers property: List of expected token issuers.JwtAuthentication
withKeys(List<TokenKey> keys)
Set the keys property: List of keys which can be used to validate access tokens.
-
-
-
Method Detail
-
issuers
public List<String> issuers()
Get the issuers property: List of expected token issuers. Token issuer is valid if it matches at least one of the given values.- Returns:
- the issuers value.
-
withIssuers
public JwtAuthentication withIssuers(List<String> issuers)
Set the issuers property: List of expected token issuers. Token issuer is valid if it matches at least one of the given values.- Parameters:
issuers
- the issuers value to set.- Returns:
- the JwtAuthentication object itself.
-
audiences
public List<String> audiences()
Get the audiences property: List of expected token audiences. Token audience is valid if it matches at least one of the given values.- Returns:
- the audiences value.
-
withAudiences
public JwtAuthentication withAudiences(List<String> audiences)
Set the audiences property: List of expected token audiences. Token audience is valid if it matches at least one of the given values.- Parameters:
audiences
- the audiences value to set.- Returns:
- the JwtAuthentication object itself.
-
claims
public List<TokenClaim> claims()
Get the claims property: List of additional token claims to be validated. Token must contains all claims and respective values for it to be valid.- Returns:
- the claims value.
-
withClaims
public JwtAuthentication withClaims(List<TokenClaim> claims)
Set the claims property: List of additional token claims to be validated. Token must contains all claims and respective values for it to be valid.- Parameters:
claims
- the claims value to set.- Returns:
- the JwtAuthentication object itself.
-
keys
public List<TokenKey> keys()
Get the keys property: List of keys which can be used to validate access tokens. Having multiple keys allow for seamless key rotation of the token signing key. Token signature must match exactly one key.- Returns:
- the keys value.
-
withKeys
public JwtAuthentication withKeys(List<TokenKey> keys)
Set the keys property: List of keys which can be used to validate access tokens. Having multiple keys allow for seamless key rotation of the token signing key. Token signature must match exactly one key.- Parameters:
keys
- the keys value to set.- Returns:
- the JwtAuthentication object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classAuthenticationBase
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-