OriginAuthenticationProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.cdn.models.OriginAuthenticationProperties

Implements

public final class OriginAuthenticationProperties
implements JsonSerializable<OriginAuthenticationProperties>

The JSON object that contains the properties of the origin authentication settings.

Constructor Summary

Constructor Description
OriginAuthenticationProperties()

Creates an instance of OriginAuthenticationProperties class.

Method Summary

Modifier and Type Method and Description
static OriginAuthenticationProperties fromJson(JsonReader jsonReader)

Reads an instance of OriginAuthenticationProperties from the JsonReader.

String scope()

Get the scope property: The scope used when requesting token from Microsoft Entra.

JsonWriter toJson(JsonWriter jsonWriter)
OriginAuthenticationTokenDestinationHeader tokenDestinationHeader()

Get the tokenDestinationHeader property: The HTTP request header where the origin authentication token will be placed when forwarding the request to the origin.

OriginAuthenticationType type()

Get the type property: The type of the authentication for the origin.

ResourceReference userAssignedIdentity()

Get the userAssignedIdentity property: The user assigned managed identity to use for the origin authentication if type is UserAssignedIdentity.

void validate()

Validates the instance.

OriginAuthenticationProperties withScope(String scope)

Set the scope property: The scope used when requesting token from Microsoft Entra.

OriginAuthenticationProperties withTokenDestinationHeader(OriginAuthenticationTokenDestinationHeader tokenDestinationHeader)

Set the tokenDestinationHeader property: The HTTP request header where the origin authentication token will be placed when forwarding the request to the origin.

OriginAuthenticationProperties withType(OriginAuthenticationType type)

Set the type property: The type of the authentication for the origin.

OriginAuthenticationProperties withUserAssignedIdentity(ResourceReference userAssignedIdentity)

Set the userAssignedIdentity property: The user assigned managed identity to use for the origin authentication if type is UserAssignedIdentity.

Methods inherited from java.lang.Object

Constructor Details

OriginAuthenticationProperties

public OriginAuthenticationProperties()

Creates an instance of OriginAuthenticationProperties class.

Method Details

fromJson

public static OriginAuthenticationProperties fromJson(JsonReader jsonReader)

Reads an instance of OriginAuthenticationProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the OriginAuthenticationProperties.

scope

public String scope()

Get the scope property: The scope used when requesting token from Microsoft Entra. For example, for Azure Blob Storage, scope could be "https://storage.azure.com/.default".

Returns:

the scope value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

tokenDestinationHeader

public OriginAuthenticationTokenDestinationHeader tokenDestinationHeader()

Get the tokenDestinationHeader property: The HTTP request header where the origin authentication token will be placed when forwarding the request to the origin. If not specified, the service will use the `Authorization` header for backward compatibility.

Returns:

the tokenDestinationHeader value.

type

public OriginAuthenticationType type()

Get the type property: The type of the authentication for the origin.

Returns:

the type value.

userAssignedIdentity

public ResourceReference userAssignedIdentity()

Get the userAssignedIdentity property: The user assigned managed identity to use for the origin authentication if type is UserAssignedIdentity.

Returns:

the userAssignedIdentity value.

validate

public void validate()

Validates the instance.

withScope

public OriginAuthenticationProperties withScope(String scope)

Set the scope property: The scope used when requesting token from Microsoft Entra. For example, for Azure Blob Storage, scope could be "https://storage.azure.com/.default".

Parameters:

scope - the scope value to set.

Returns:

the OriginAuthenticationProperties object itself.

withTokenDestinationHeader

public OriginAuthenticationProperties withTokenDestinationHeader(OriginAuthenticationTokenDestinationHeader tokenDestinationHeader)

Set the tokenDestinationHeader property: The HTTP request header where the origin authentication token will be placed when forwarding the request to the origin. If not specified, the service will use the `Authorization` header for backward compatibility.

Parameters:

tokenDestinationHeader - the tokenDestinationHeader value to set.

Returns:

the OriginAuthenticationProperties object itself.

withType

public OriginAuthenticationProperties withType(OriginAuthenticationType type)

Set the type property: The type of the authentication for the origin.

Parameters:

type - the type value to set.

Returns:

the OriginAuthenticationProperties object itself.

withUserAssignedIdentity

public OriginAuthenticationProperties withUserAssignedIdentity(ResourceReference userAssignedIdentity)

Set the userAssignedIdentity property: The user assigned managed identity to use for the origin authentication if type is UserAssignedIdentity.

Parameters:

userAssignedIdentity - the userAssignedIdentity value to set.

Returns:

the OriginAuthenticationProperties object itself.

Applies to