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

com.microsoft.aad.msal4j.TokenCacheAccessContext Maven / Gradle / Ivy

Go to download

Microsoft Authentication Library for Java gives you the ability to obtain tokens from Azure AD v2 (work and school accounts, MSA) and Azure AD B2C, gaining access to Microsoft Cloud API and any other API secured by Microsoft identities

There is a newer version: 1.18.0
Show newest version
// Generated by delombok at Fri Jul 26 21:46:44 UTC 2024
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.aad.msal4j;

/**
 * Context in which the the token cache is accessed

 * 

* For more details, see https://aka.ms/msal4j-token-cache */ public class TokenCacheAccessContext implements ITokenCacheAccessContext { private ITokenCache tokenCache; private String clientId; private IAccount account; private boolean hasCacheChanged; @java.lang.SuppressWarnings("all") TokenCacheAccessContext(final ITokenCache tokenCache, final String clientId, final IAccount account, final boolean hasCacheChanged) { this.tokenCache = tokenCache; this.clientId = clientId; this.account = account; this.hasCacheChanged = hasCacheChanged; } @java.lang.SuppressWarnings("all") public static class TokenCacheAccessContextBuilder { @java.lang.SuppressWarnings("all") private ITokenCache tokenCache; @java.lang.SuppressWarnings("all") private String clientId; @java.lang.SuppressWarnings("all") private IAccount account; @java.lang.SuppressWarnings("all") private boolean hasCacheChanged; @java.lang.SuppressWarnings("all") TokenCacheAccessContextBuilder() { } @java.lang.SuppressWarnings("all") public TokenCacheAccessContextBuilder tokenCache(final ITokenCache tokenCache) { this.tokenCache = tokenCache; return this; } @java.lang.SuppressWarnings("all") public TokenCacheAccessContextBuilder clientId(final String clientId) { this.clientId = clientId; return this; } @java.lang.SuppressWarnings("all") public TokenCacheAccessContextBuilder account(final IAccount account) { this.account = account; return this; } @java.lang.SuppressWarnings("all") public TokenCacheAccessContextBuilder hasCacheChanged(final boolean hasCacheChanged) { this.hasCacheChanged = hasCacheChanged; return this; } @java.lang.SuppressWarnings("all") public TokenCacheAccessContext build() { return new TokenCacheAccessContext(tokenCache, clientId, account, hasCacheChanged); } @java.lang.Override @java.lang.SuppressWarnings("all") public java.lang.String toString() { return "TokenCacheAccessContext.TokenCacheAccessContextBuilder(tokenCache=" + this.tokenCache + ", clientId=" + this.clientId + ", account=" + this.account + ", hasCacheChanged=" + this.hasCacheChanged + ")"; } } @java.lang.SuppressWarnings("all") public static TokenCacheAccessContextBuilder builder() { return new TokenCacheAccessContextBuilder(); } @java.lang.SuppressWarnings("all") public ITokenCache tokenCache() { return this.tokenCache; } @java.lang.SuppressWarnings("all") public String clientId() { return this.clientId; } @java.lang.SuppressWarnings("all") public IAccount account() { return this.account; } @java.lang.SuppressWarnings("all") public boolean hasCacheChanged() { return this.hasCacheChanged; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy