Class SocialAuthorizationHeaderValue

The SocialAuthenticationHeaderValue class represents authorization information according to the custom scheme supported by the Episerver Social platform.

Inheritance
System.Object
SocialAuthorizationHeaderValue
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Social.Common.Rest
Assembly: EPiServer.Social.Common.Rest.dll
Version: 1.5.4
Syntax
public class SocialAuthorizationHeaderValue

Constructors

SocialAuthorizationHeaderValue(String, String, String, String)

Constructor

Declaration
public SocialAuthorizationHeaderValue(string tenantId, string timestamp, string nonce, string signature)
Parameters
Type Name Description
System.String tenantId

Requesting tenant's ID

System.String timestamp

Request's timestamp

System.String nonce

Request's nonce value

System.String signature

Request's signature

Fields

Scheme

Name of the HTTP authorization scheme represented by this class.

Declaration
public const string Scheme = "epi"
Field Value
Type Description
System.String

Properties

Nonce

Gets the one-time use, unique identifier (nonce) defined within this header. This value can be used to minimize the potential for replay attacks.

Declaration
public string Nonce { get; }
Property Value
Type Description
System.String

Signature

Gets the cryptographic signature for the request.

Declaration
public string Signature { get; }
Property Value
Type Description
System.String

TenantId

Gets the identifier for the tenant who issued the request.

Declaration
public string TenantId { get; }
Property Value
Type Description
System.String

Timestamp

Gets the timestamp defined in the header, indicating when the requested was issued.

Declaration
public string Timestamp { get; }
Property Value
Type Description
System.String

Methods

ToAuthenticationHeaderValue()

Converts this header to an instance of AuthenticationHeaderValue.

Declaration
public AuthenticationHeaderValue ToAuthenticationHeaderValue()
Returns
Type Description
System.Net.Http.Headers.AuthenticationHeaderValue

A corresponding instance of AuthenticationHeaderValue

TryParse(AuthenticationHeaderValue, out SocialAuthorizationHeaderValue)

Tries to parse a raw 'Authorization' header value as an instance of SocialAuthenticationHeaderValue.

Declaration
public static bool TryParse(AuthenticationHeaderValue input, out SocialAuthorizationHeaderValue value)
Parameters
Type Name Description
System.Net.Http.Headers.AuthenticationHeaderValue input

Raw 'Authorization' header value to parse

SocialAuthorizationHeaderValue value

Parsed header value

Returns
Type Description
System.Boolean

True if the header value was parsed successfully, false otherwise

TryParse(String, out SocialAuthorizationHeaderValue)

Tries to parse a raw 'Authorization' header value as an instance of SocialAuthenticationHeaderValue.

Declaration
public static bool TryParse(string input, out SocialAuthorizationHeaderValue value)
Parameters
Type Name Description
System.String input

Raw 'Authorization' header value to parse

SocialAuthorizationHeaderValue value

Parsed header value

Returns
Type Description
System.Boolean

True if the header value was parsed successfully, false otherwise

arrow_upward