InteractiveRequestParameters.InteractiveRequestParametersBuilder 类
- java.
lang. Object - com.
microsoft. aad. msal4j. InteractiveRequestParameters. InteractiveRequestParametersBuilder
- com.
public static class InteractiveRequestParameters.InteractiveRequestParametersBuilder
方法摘要
方法继承自 java.lang.Object
方法详细信息
build
public InteractiveRequestParameters build()
claims
public InteractiveRequestParameters.InteractiveRequestParametersBuilder claims(ClaimsRequest claims)
通过 OIDC 声明请求参数请求的声明,允许对标准和自定义声明的请求
参数:
返回:
this。claimsChallenge
public InteractiveRequestParameters.InteractiveRequestParametersBuilder claimsChallenge(String claimsChallenge)
参数:
返回:
this。domainHint
public InteractiveRequestParameters.InteractiveRequestParametersBuilder domainHint(String domainHint)
提供有关用户应用于登录的租户或域的提示。 域提示的值是租户的已注册域。
参数:
返回:
this。extraHttpHeaders
public InteractiveRequestParameters.InteractiveRequestParametersBuilder extraHttpHeaders(Map<String,String> extraHttpHeaders)
向令牌请求添加其他标头
参数:
返回:
this。extraQueryParameters
public InteractiveRequestParameters.InteractiveRequestParametersBuilder extraQueryParameters(Map<String,String> extraQueryParameters)
将其他查询参数添加到令牌请求
参数:
返回:
this。httpPollingTimeoutInSeconds
public InteractiveRequestParameters.InteractiveRequestParametersBuilder httpPollingTimeoutInSeconds(int httpPollingTimeoutInSeconds)
库将等待身份验证结果的时间(以秒为单位)。 120 秒是默认超时,除非在此处用一些其他正整数重写(如果此超时设置为 0 或更少)将被忽略,并且库将改用 1 秒超时
参数:
返回:
this。instanceAware
public InteractiveRequestParameters.InteractiveRequestParametersBuilder instanceAware(boolean instanceAware)
如果设置为 true,授权结果将包含用户主云的颁发机构,并且此颁发机构将用于令牌请求,而不是应用程序中设置的颁发机构。
参数:
返回:
this。loginHint
public InteractiveRequestParameters.InteractiveRequestParametersBuilder loginHint(String loginHint)
如果提前知道用户名/电子邮件地址,可用于预填充用户的登录页的用户名/电子邮件地址字段。 应用通常在重新身份验证期间使用此参数,使用 preferred_username 声明从以前的登录中提取用户名。
参数:
返回:
this。prompt
public InteractiveRequestParameters.InteractiveRequestParametersBuilder prompt(Prompt prompt)
指示所需的用户交互类型。
参数:
返回:
this。proofOfPossession
public InteractiveRequestParameters.InteractiveRequestParametersBuilder proofOfPossession(HttpMethod httpMethod, URI uri, String nonce)
设置此请求的 PopParameters,允许请求检索所有权证明令牌,而不是持有者令牌。有关详细信息,请参阅 PopParameters 和 https://aka.ms/msal4j-pop
参数:
https://graph.microsoft.com/beta/me/profile
redirectUri
public InteractiveRequestParameters.InteractiveRequestParametersBuilder redirectUri(@NonNull URI redirectUri)
重定向 URI,MSAL 将侦听 Azure AD 返回的授权代码。 应该是具有指定端口的环回地址(例如, http://localhost:3671). 如果未指定端口,MSAL 将找到一个打开的端口。 有关详细信息,请参阅 https://aka.ms/msal4j-interactive-request。
参数:
返回:
this。scopes
public InteractiveRequestParameters.InteractiveRequestParametersBuilder scopes(Set<String> scopes)
应用程序请求访问权限的范围,用户将同意。
参数:
返回:
this。systemBrowserOptions
public InteractiveRequestParameters.InteractiveRequestParametersBuilder systemBrowserOptions(SystemBrowserOptions systemBrowserOptions)
PublicClientApplication 要使用的集SystemBrowserOptions
参数:
返回:
this。tenant
public InteractiveRequestParameters.InteractiveRequestParametersBuilder tenant(String tenant)
替代此请求的颁发机构 URL 中的租户值
参数:
返回:
this。toString
public String toString()
替代:
InteractiveRequestParameters.InteractiveRequestParametersBuilder.toString()windowHandle
public InteractiveRequestParameters.InteractiveRequestParametersBuilder windowHandle(long windowHandle)
父窗口句柄,用于打开具有正确父级的 UI 元素(对于浏览器方案和Windows控制台应用程序),对于Windows控制台应用程序,MSAL Java在未设置此参数的情况下尝试发现控制台的窗口句柄。对于 MSAL Java负责打开 UI 元素(例如使用 MSALRuntime 时),此参数是必需的,如果未设置,将引发异常
参数:
返回:
this。