Dela via


UserNamePasswordParameters.UserNamePasswordParametersBuilder Class

  • java.lang.Object
    • com.microsoft.aad.msal4j.UserNamePasswordParameters.UserNamePasswordParametersBuilder

public static class UserNamePasswordParameters.UserNamePasswordParametersBuilder

Method Summary

Modifier and Type Method and Description
UserNamePasswordParameters build()
UserNamePasswordParametersBuilder claims(ClaimsRequest claims)

Claims to be requested through the OIDC claims request parameter, allowing requests for standard and custom claims

UserNamePasswordParametersBuilder extraHttpHeaders(Map<String,String> extraHttpHeaders)

Adds additional headers to the token request

UserNamePasswordParametersBuilder extraQueryParameters(Map<String,String> extraQueryParameters)

Adds additional query parameters to the token request

UserNamePasswordParametersBuilder password(char[] password)
UserNamePasswordParametersBuilder proofOfPossession(HttpMethod httpMethod, URI uri, String nonce)

Sets the PopParameters for this request, allowing the request to retrieve proof-of-possession tokens rather than bearer tokens For more information, see PopParameters and https://aka.ms/msal4j-pop

UserNamePasswordParametersBuilder scopes(@NonNull Set<String> scopes)

Scopes application is requesting access to

UserNamePasswordParametersBuilder tenant(String tenant)

Overrides the tenant value in the authority URL for this request

java.lang.String toString()
UserNamePasswordParametersBuilder username(@NonNull String username)

Username of the account

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Method Details

build

public UserNamePasswordParameters build()

claims

public UserNamePasswordParameters.UserNamePasswordParametersBuilder claims(ClaimsRequest claims)

Claims to be requested through the OIDC claims request parameter, allowing requests for standard and custom claims

Parameters:

claims

Returns:

this.

extraHttpHeaders

public UserNamePasswordParameters.UserNamePasswordParametersBuilder extraHttpHeaders(Map extraHttpHeaders)

Adds additional headers to the token request

Parameters:

extraHttpHeaders

Returns:

this.

extraQueryParameters

public UserNamePasswordParameters.UserNamePasswordParametersBuilder extraQueryParameters(Map extraQueryParameters)

Adds additional query parameters to the token request

Parameters:

extraQueryParameters

Returns:

this.

password

public UserNamePasswordParameters.UserNamePasswordParametersBuilder password(char[] password)

Parameters:

password

proofOfPossession

public UserNamePasswordParameters.UserNamePasswordParametersBuilder proofOfPossession(HttpMethod httpMethod, URI uri, String nonce)

Sets the PopParameters for this request, allowing the request to retrieve proof-of-possession tokens rather than bearer tokens For more information, see PopParameters and https://aka.ms/msal4j-pop

Parameters:

httpMethod - a valid HTTP method, such as "GET" or "POST"
uri - URI to associate with the token
nonce - optional nonce value for the token, can be empty or null

scopes

public UserNamePasswordParameters.UserNamePasswordParametersBuilder scopes(@NonNull Set scopes)

Scopes application is requesting access to

Parameters:

scopes

Returns:

this.

tenant

public UserNamePasswordParameters.UserNamePasswordParametersBuilder tenant(String tenant)

Overrides the tenant value in the authority URL for this request

Parameters:

tenant

Returns:

this.

toString

public String toString()

Overrides:

UserNamePasswordParameters.UserNamePasswordParametersBuilder.toString()

username

public UserNamePasswordParameters.UserNamePasswordParametersBuilder username(@NonNull String username)

Username of the account

Parameters:

username

Returns:

this.

Applies to