IPublicClientApplication Interface
Implements
public interface IPublicClientApplication
extends com.microsoft.aad.msal4j.IClientApplicationBase
Interface representing a public client application (Desktop, Mobile). Public client application are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user. For details see https://aka.ms/msal4jclientapplications
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract
java.util.concurrent.CompletableFuture<IAuthentication |
acquireToken(DeviceCodeFlowParameters parameters)
Acquires security token from the authority using an device code flow. |
abstract
java.util.concurrent.CompletableFuture<IAuthentication |
acquireToken(IntegratedWindowsAuthenticationParameters parameters)
Acquires tokens from the authority configured in the application via Integrated Windows Authentication. |
abstract
java.util.concurrent.CompletableFuture<IAuthentication |
acquireToken(InteractiveRequestParameters parameters)
Acquires tokens from the authority using authorization code grant. |
abstract
java.util.concurrent.CompletableFuture<IAuthentication |
acquireToken(UserNamePasswordParameters parameters)
Acquires tokens from the authority configured in the application via Username/Password authentication. |
Method Details
acquireToken
public abstract CompletableFuture
Acquires security token from the authority using an device code flow. Flow is designed for devices that do not have access to a browser or have input constraints. The authorization server issues DeviceCode object with verification code, an end-user code and the end-user verification URI. DeviceCode is provided through deviceCodeConsumer callback. End-user should be instructed to use another device to connect to the authorization server to approve the access request. Since the client cannot receive incoming requests, it polls the authorization server repeatedly until the end-user completes the approval process.
Parameters:
Returns:
acquireToken
public abstract CompletableFuture
Acquires tokens from the authority configured in the application via Integrated Windows Authentication.
Parameters:
Returns:
acquireToken
public abstract CompletableFuture
Acquires tokens from the authority using authorization code grant. Will attempt to open the default system browser where the user can input the credentials interactively, consent to scopes, and do multi-factor authentication if such a policy is enabled on the Azure AD tenant. System browser can behavior can be customized via InteractiveRequestParameters#systemBrowserOptions. For more information, see https://aka.ms/msal4j-interactive-request
Parameters:
Returns:
acquireToken
public abstract CompletableFuture
Acquires tokens from the authority configured in the application via Username/Password authentication.
Parameters:
Returns: