IPublicClientApplication 接口
实现
public interface IPublicClientApplication
extends com.microsoft.aad.msal4j.IClientApplicationBase
表示公共客户端应用程序(桌面、移动版)的接口。 公共客户端应用程序不受信任,无法安全地存储应用程序机密,因此只能请求用户名中的令牌。 有关详细信息,请参阅 https://aka.ms/msal4jclientapplications
方法摘要
| 修饰符和类型 | 方法和描述 |
|---|---|
|
abstract
java.util.concurrent.CompletableFuture<IAuthentication |
acquireToken(DeviceCodeFlowParameters parameters)
使用设备代码流从颁发机构获取安全令牌。 |
|
abstract
java.util.concurrent.CompletableFuture<IAuthentication |
acquireToken(IntegratedWindowsAuthenticationParameters parameters)
通过集成Windows身份验证从应用程序中配置的颁发机构获取令牌。 |
|
abstract
java.util.concurrent.CompletableFuture<IAuthentication |
acquireToken(InteractiveRequestParameters parameters)
使用授权代码授予从颁发机构获取令牌。 |
|
abstract
java.util.concurrent.CompletableFuture<IAuthentication |
acquireToken(UserNamePasswordParameters parameters)
通过用户名/密码身份验证从应用程序中配置的颁发机构获取令牌。 |
方法详细信息
acquireToken
public abstract CompletableFuture<IAuthenticationResult> acquireToken(DeviceCodeFlowParameters parameters)
使用设备代码流从颁发机构获取安全令牌。 Flow 专为无权访问浏览器或具有输入约束的设备而设计。 授权服务器向 DeviceCode 对象颁发验证码、最终用户代码和最终用户验证 URI。 DeviceCode 通过 deviceCodeConsumer 回调提供。 应指示最终用户使用其他设备连接到授权服务器以批准访问请求。 由于客户端无法接收传入请求,因此它会重复轮询授权服务器,直到最终用户完成审批过程。
参数:
返回:
acquireToken
public abstract CompletableFuture<IAuthenticationResult> acquireToken(IntegratedWindowsAuthenticationParameters parameters)
通过集成Windows身份验证从应用程序中配置的颁发机构获取令牌。
参数:
返回:
acquireToken
public abstract CompletableFuture<IAuthenticationResult> acquireToken(InteractiveRequestParameters parameters)
使用授权代码授予从颁发机构获取令牌。 尝试打开默认系统浏览器,用户可在其中以交互方式输入凭据、同意范围,并在 Azure AD 租户上启用此类策略时执行多重身份验证。 可以通过 InteractiveRequestParameters#systemBrowserOptions自定义系统浏览器的行为。 有关详细信息,请参阅 https://aka.ms/msal4j-interactive-request
参数:
返回:
acquireToken
public abstract CompletableFuture<IAuthenticationResult> acquireToken(UserNamePasswordParameters parameters)
通过用户名/密码身份验证从应用程序中配置的颁发机构获取令牌。
参数:
返回: