Package com.microsoft.graph.core.models
Interface TokenValidable<U extends DecryptableContent,T extends EncryptedContentBearer<U>>
- Type Parameters:
U- The type of the decryptable contentT- The type of the bearer of the encrypted content
public interface TokenValidable<U extends DecryptableContent,T extends EncryptedContentBearer<U>>
TokenValidable interface
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <U extends DecryptableContent,T extends EncryptedContentBearer<U>>
booleanareTokensValid(TokenValidable<U, T> collection, List<UUID> tenantIds, List<UUID> appIds) Validates the tokensstatic <U extends DecryptableContent,T extends EncryptedContentBearer<U>>
booleanareTokensValid(TokenValidable<U, T> collection, List<UUID> tenantIds, List<UUID> appIds, String keyDiscoveryUrl) Validates the tokensReturns validation tokensgetValue()Get collection of encrypted token bearersstatic <U extends DecryptableContent,T extends EncryptedContentBearer<U>>
booleanValidates the tokenvoidsetValidationTokens(List<String> validationTokens) Sets collection of validation tokensvoidSets collection of encrypted token bearers
-
Field Details
-
graphNotificationPublisher
Graph notification publisher. Ensures that a different app that isn't Microsoft Graph did not send the change notifications- See Also:
-
-
Method Details
-
setValidationTokens
Sets collection of validation tokens- Parameters:
validationTokens- tokens
-
getValidationTokens
Returns validation tokens- Returns:
- list of tokens
-
setValue
Sets collection of encrypted token bearers- Parameters:
value- collection of encrypted token bearers
-
getValue
Get collection of encrypted token bearers- Returns:
- encrypted token bearers
-
areTokensValid
static <U extends DecryptableContent,T extends EncryptedContentBearer<U>> boolean areTokensValid(@Nonnull TokenValidable<U, T> collection, @Nonnull List<UUID> tenantIds, @Nonnull List<UUID> appIds, @Nonnull String keyDiscoveryUrl) Validates the tokens- Type Parameters:
U- DecryptableContentT- EncryptedContentBearer- Parameters:
collection- collection of encrypted token bearerstenantIds- tenant idsappIds- app idskeyDiscoveryUrl- the JWKS endpoint to use to retrieve signing keys- Returns:
- true if the tokens are valid
- Throws:
IllegalArgumentException- if one of the tokens are invalid
-
areTokensValid
static <U extends DecryptableContent,T extends EncryptedContentBearer<U>> boolean areTokensValid(@Nonnull TokenValidable<U, T> collection, @Nonnull List<UUID> tenantIds, @Nonnull List<UUID> appIds) Validates the tokens- Type Parameters:
U- DecryptableContentT- EncryptedContentBearer- Parameters:
collection- collection of encrypted token bearerstenantIds- tenant idsappIds- app ids- Returns:
- true if the tokens are valid
-
isTokenValid
static <U extends DecryptableContent,T extends EncryptedContentBearer<U>> boolean isTokenValid(@Nonnull String token, @Nonnull List<UUID> tenantIds, @Nonnull List<UUID> appIds, @Nonnull String keyDiscoveryUrl) Validates the token- Type Parameters:
U- DecryptableContentT- EncryptedContentBearer- Parameters:
token- tokentenantIds- tenant idsappIds- app idskeyDiscoveryUrl- the JWKS endpoint to use to retrieve signing keys- Returns:
- true if the token is valid
- Throws:
IllegalArgumentException- if the token is invalid
-