C# Class D2L.Extensibility.AuthSdk.Impl.D2LUserContext

An implementation of ID2LUserContext
Inheritance: ID2LUserContext
Show file Open project: Brightspace/valence-sdk-dotnet

Private Properties

Property Type Description
CreateApiUrl System.Uri
D2LUserContext System
FormatSignature string
GetAdjustedTimestampInSeconds long
ID2LUserContext RequestResult
ID2LUserContext UserContextProperties
InterpretStatusCodeForbidden RequestResult
TryCalculateServerSkewFromResponse bool

Public Methods

Method Description
CreateAuthenticatedTokens ( Uri fullUrl, string httpMethod ) : string>>.IEnumerable
CreateAuthenticatedTokens ( string path, string httpMethod ) : string>>.IEnumerable
CreateAuthenticatedUri ( Uri fullUrl, string httpMethod ) : Uri
CreateAuthenticatedUri ( string path, string httpMethod ) : Uri

Private Methods

Method Description
CreateApiUrl ( string path ) : Uri
D2LUserContext ( ITimestampProvider timestampProvider, string appId, string appKey, string userId, string userKey, HostSpec apiHost ) : System

Constructs a D2LUserContext with the parameters provided

FormatSignature ( string path, string httpMethod, long timestampSeconds ) : string

Formats a signature to the format required by the D2L API servers

GetAdjustedTimestampInSeconds ( ) : long

Returns the timestamp in milliseconds adjusting for the calculated skew

ID2LUserContext ( D2LWebException exceptionWrapper ) : RequestResult
ID2LUserContext ( ) : UserContextProperties
InterpretStatusCodeForbidden ( string responseBody ) : RequestResult

Helper method fpor interpreting results when a 403 is received.

TryCalculateServerSkewFromResponse ( string responseBody ) : bool

Adjusts the server skew if necessary based on the body of the response

Method Details

CreateAuthenticatedTokens() public method

public CreateAuthenticatedTokens ( Uri fullUrl, string httpMethod ) : string>>.IEnumerable
fullUrl System.Uri
httpMethod string
return string>>.IEnumerable

CreateAuthenticatedTokens() public method

public CreateAuthenticatedTokens ( string path, string httpMethod ) : string>>.IEnumerable
path string
httpMethod string
return string>>.IEnumerable

CreateAuthenticatedUri() public method

public CreateAuthenticatedUri ( Uri fullUrl, string httpMethod ) : Uri
fullUrl System.Uri
httpMethod string
return System.Uri

CreateAuthenticatedUri() public method

public CreateAuthenticatedUri ( string path, string httpMethod ) : Uri
path string
httpMethod string
return System.Uri