ClientCredentialParameters.ClientCredentialParametersBuilder Class
- java.
lang. Object - com.
microsoft. aad. msal4j. ClientCredentialParameters. ClientCredentialParametersBuilder
- com.
public static class ClientCredentialParameters.ClientCredentialParametersBuilder
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Client |
build() |
|
Client |
claims(ClaimsRequest claims)
Claims to be requested through the OIDC claims request parameter, allowing requests for standard and custom claims |
|
Client |
claimsFromClient(String claimsJson)
Specifies client-originated claims (a raw JSON object string) to forward to the token endpoint as the OAuth |
|
Client |
clientCredential(IClientCredential clientCredential)
Overrides the client credentials for this request |
|
Client |
extraHttpHeaders(Map<String,String> extraHttpHeaders)
Adds additional headers to the token request |
|
Client |
extraQueryParameters(Map<String,String> extraQueryParameters)
Deprecated
Not recommended for production scenarios. It will be removed in a future release, and the behavior may be replaced by a new API.
Adds additional query parameters to the token request |
|
Client |
fmiPath(String fmiPath)
Sets the FMI (Federated Managed Identity) path for agent identity scenarios. |
|
Client |
scopes(Set<String> scopes)
Scopes application is requesting access to. |
|
Client |
skipCache(Boolean skipCache)
Indicates whether the request should skip looking into the token cache. |
|
Client |
tenant(String tenant)
Overrides the tenant value in the authority URL for this request |
| java.lang.String | toString() |
Methods inherited from java.lang.Object
Method Details
build
public ClientCredentialParameters build()
claims
public ClientCredentialParameters.ClientCredentialParametersBuilder claims(ClaimsRequest claims)
Claims to be requested through the OIDC claims request parameter, allowing requests for standard and custom claims
Parameters:
claimsFromClient
public ClientCredentialParameters.ClientCredentialParametersBuilder claimsFromClient(String claimsJson)
Specifies client-originated claims (a raw JSON object string) to forward to the token endpoint as the OAuth claims request parameter. Unlike claims(ClaimsRequest claims) (server-issued claims challenges, which bypass the cache), tokens acquired with client claims are cached and the cache entry is keyed on the claims value, so distinct claim values produce separate cache entries. Use stable, non-dynamic values to avoid cache fragmentation. Send the identical value on every request for a given token; because the raw value is part of the cache key, changing or omitting it routes the request to a different cache partition. A blank value is ignored; an invalid JSON object throws MsalClientException.
Parameters:
Returns:
clientCredential
public ClientCredentialParameters.ClientCredentialParametersBuilder clientCredential(IClientCredential clientCredential)
Overrides the client credentials for this request
Parameters:
extraHttpHeaders
public ClientCredentialParameters.ClientCredentialParametersBuilder extraHttpHeaders(Map<String,String> extraHttpHeaders)
Adds additional headers to the token request
Parameters:
extraQueryParameters
public ClientCredentialParameters.ClientCredentialParametersBuilder extraQueryParameters(Map<String,String> extraQueryParameters)
Deprecated
Adds additional query parameters to the token request
Parameters:
fmiPath
public ClientCredentialParameters.ClientCredentialParametersBuilder fmiPath(String fmiPath)
Sets the FMI (Federated Managed Identity) path for agent identity scenarios. When set, fmi_path is sent as a body parameter in the client credentials token request, which tells Entra ID to scope the resulting token to a specific agent identity. The token is also cached with an extended cache key to prevent collisions between tokens for different agent identities.
Parameters:
Returns:
scopes
public ClientCredentialParameters.ClientCredentialParametersBuilder scopes(Set<String> scopes)
Scopes application is requesting access to.
Cannot be null.
Parameters:
skipCache
public ClientCredentialParameters.ClientCredentialParametersBuilder skipCache(Boolean skipCache)
Indicates whether the request should skip looking into the token cache. Be default it is set to false.
Parameters:
tenant
public ClientCredentialParameters.ClientCredentialParametersBuilder tenant(String tenant)
Overrides the tenant value in the authority URL for this request
Parameters:
toString
public String toString()
Overrides:
ClientCredentialParameters.ClientCredentialParametersBuilder.toString()