AuthenticationProviderProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.AuthenticationProviderProperties

Implements

public final class AuthenticationProviderProperties
implements JsonSerializable<AuthenticationProviderProperties>

Properties for authentication provider configuration. A policy must configure either JWT validation fields or user sign-in fields; the two configurations are mutually exclusive and cannot be combined.

Constructor Summary

Constructor Description
AuthenticationProviderProperties()

Creates an instance of AuthenticationProviderProperties class.

Method Summary

Modifier and Type Method and Description
String audience()

Get the audience property: The intended audience for the JWT.

String clientId()

Get the clientId property: The Application (client) ID for the related application registered in Microsoft Entra ID, formatted as a GUID.

String clientSecret()

Get the clientSecret property: The absolute HTTPS Key Vault secret URL identifying the client secret used for authentication.

static AuthenticationProviderProperties fromJson(JsonReader jsonReader)

Reads an instance of AuthenticationProviderProperties from the JsonReader.

String issuer()

Get the issuer property: The absolute HTTPS URL of the Secure Token Service.

String jwksUri()

Get the jwksUri property: The JSON Web Key Set (JWKS) URI used to retrieve the public keys for JWT validation.

List<String> scope()

Get the scope property: The scopes used by an application during authentication to authorize access to a user's details.

String sessionCookieName()

Get the sessionCookieName property: The name of the session cookie used for user authentication.

String sessionTimeout()

Get the sessionTimeout property: The timeout of the session cookie used for user authentication.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

AuthenticationProviderProperties withAudience(String audience)

Set the audience property: The intended audience for the JWT.

AuthenticationProviderProperties withClientId(String clientId)

Set the clientId property: The Application (client) ID for the related application registered in Microsoft Entra ID, formatted as a GUID.

AuthenticationProviderProperties withClientSecret(String clientSecret)

Set the clientSecret property: The absolute HTTPS Key Vault secret URL identifying the client secret used for authentication.

AuthenticationProviderProperties withIssuer(String issuer)

Set the issuer property: The absolute HTTPS URL of the Secure Token Service.

AuthenticationProviderProperties withJwksUri(String jwksUri)

Set the jwksUri property: The JSON Web Key Set (JWKS) URI used to retrieve the public keys for JWT validation.

AuthenticationProviderProperties withScope(List<String> scope)

Set the scope property: The scopes used by an application during authentication to authorize access to a user's details.

AuthenticationProviderProperties withSessionCookieName(String sessionCookieName)

Set the sessionCookieName property: The name of the session cookie used for user authentication.

AuthenticationProviderProperties withSessionTimeout(String sessionTimeout)

Set the sessionTimeout property: The timeout of the session cookie used for user authentication.

Methods inherited from java.lang.Object

Constructor Details

AuthenticationProviderProperties

public AuthenticationProviderProperties()

Creates an instance of AuthenticationProviderProperties class.

Method Details

audience

public String audience()

Get the audience property: The intended audience for the JWT. Only a single audience value is supported in this API version. Example: https://audience.com/\{application-id\}.

Returns:

the audience value.

clientId

public String clientId()

Get the clientId property: The Application (client) ID for the related application registered in Microsoft Entra ID, formatted as a GUID.

Returns:

the clientId value.

clientSecret

public String clientSecret()

Get the clientSecret property: The absolute HTTPS Key Vault secret URL identifying the client secret used for authentication. This property is required for user sign-in policies. It holds only the Key Vault reference; the secret value itself is never accepted or returned by this API and is read from Key Vault at runtime using the resource's user-assigned identity. The secret value stored in Key Vault can contain up to 4096 characters. Example: https://myvault.vault.azure.net/secrets/mysecret.

Returns:

the clientSecret value.

fromJson

public static AuthenticationProviderProperties fromJson(JsonReader jsonReader)

Reads an instance of AuthenticationProviderProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AuthenticationProviderProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

issuer

public String issuer()

Get the issuer property: The absolute HTTPS URL of the Secure Token Service. Include a trailing slash at the end of the value. Example: https://login.microsoftonline.com/\{Microsoft Entra Tenant ID}/.

Returns:

the issuer value.

jwksUri

public String jwksUri()

Get the jwksUri property: The JSON Web Key Set (JWKS) URI used to retrieve the public keys for JWT validation. Example: https://login.microsoftonline.com/\{Microsoft Entra Tenant ID}/discovery/v2.0/keys.

Returns:

the jwksUri value.

scope

public List<String> scope()

Get the scope property: The scopes used by an application during authentication to authorize access to a user's details. A maximum of 10 scopes is supported, each scope can contain up to 128 characters, and all scopes can contain up to 256 characters combined.

Returns:

the scope value.

sessionCookieName

public String sessionCookieName()

Get the sessionCookieName property: The name of the session cookie used for user authentication. Applicable to the Application Gateway post-OIDC workflow.

Returns:

the sessionCookieName value.

sessionTimeout

public String sessionTimeout()

Get the sessionTimeout property: The timeout of the session cookie used for user authentication. The service accepts and returns this value as a string containing a base-10 unsigned integer number of seconds with no sign, decimal point, unit suffix, or whitespace (for example `86400`). The supported range is 1 to 604800 seconds, and the default is 86400 seconds. Applicable to the Application Gateway post-OIDC workflow.

Returns:

the sessionTimeout value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAudience

public AuthenticationProviderProperties withAudience(String audience)

Set the audience property: The intended audience for the JWT. Only a single audience value is supported in this API version. Example: https://audience.com/\{application-id\}.

Parameters:

audience - the audience value to set.

Returns:

the AuthenticationProviderProperties object itself.

withClientId

public AuthenticationProviderProperties withClientId(String clientId)

Set the clientId property: The Application (client) ID for the related application registered in Microsoft Entra ID, formatted as a GUID.

Parameters:

clientId - the clientId value to set.

Returns:

the AuthenticationProviderProperties object itself.

withClientSecret

public AuthenticationProviderProperties withClientSecret(String clientSecret)

Set the clientSecret property: The absolute HTTPS Key Vault secret URL identifying the client secret used for authentication. This property is required for user sign-in policies. It holds only the Key Vault reference; the secret value itself is never accepted or returned by this API and is read from Key Vault at runtime using the resource's user-assigned identity. The secret value stored in Key Vault can contain up to 4096 characters. Example: https://myvault.vault.azure.net/secrets/mysecret.

Parameters:

clientSecret - the clientSecret value to set.

Returns:

the AuthenticationProviderProperties object itself.

withIssuer

public AuthenticationProviderProperties withIssuer(String issuer)

Set the issuer property: The absolute HTTPS URL of the Secure Token Service. Include a trailing slash at the end of the value. Example: https://login.microsoftonline.com/\{Microsoft Entra Tenant ID}/.

Parameters:

issuer - the issuer value to set.

Returns:

the AuthenticationProviderProperties object itself.

withJwksUri

public AuthenticationProviderProperties withJwksUri(String jwksUri)

Set the jwksUri property: The JSON Web Key Set (JWKS) URI used to retrieve the public keys for JWT validation. Example: https://login.microsoftonline.com/\{Microsoft Entra Tenant ID}/discovery/v2.0/keys.

Parameters:

jwksUri - the jwksUri value to set.

Returns:

the AuthenticationProviderProperties object itself.

withScope

public AuthenticationProviderProperties withScope(List<String> scope)

Set the scope property: The scopes used by an application during authentication to authorize access to a user's details. A maximum of 10 scopes is supported, each scope can contain up to 128 characters, and all scopes can contain up to 256 characters combined.

Parameters:

scope - the scope value to set.

Returns:

the AuthenticationProviderProperties object itself.

withSessionCookieName

public AuthenticationProviderProperties withSessionCookieName(String sessionCookieName)

Set the sessionCookieName property: The name of the session cookie used for user authentication. Applicable to the Application Gateway post-OIDC workflow.

Parameters:

sessionCookieName - the sessionCookieName value to set.

Returns:

the AuthenticationProviderProperties object itself.

withSessionTimeout

public AuthenticationProviderProperties withSessionTimeout(String sessionTimeout)

Set the sessionTimeout property: The timeout of the session cookie used for user authentication. The service accepts and returns this value as a string containing a base-10 unsigned integer number of seconds with no sign, decimal point, unit suffix, or whitespace (for example `86400`). The supported range is 1 to 604800 seconds, and the default is 86400 seconds. Applicable to the Application Gateway post-OIDC workflow.

Parameters:

sessionTimeout - the sessionTimeout value to set.

Returns:

the AuthenticationProviderProperties object itself.

Applies to