Show / Hide Table of Contents

Class OAuthClientBase

Inheritance
object
OAuthClientBase
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DotNetNuke.Services.Authentication.OAuth
Assembly: DotNetNuke.dll
Syntax
public abstract class OAuthClientBase

Constructors

OAuthClientBase(int, AuthMode, string)

Declaration
protected OAuthClientBase(int portalId, AuthMode mode, string service)
Parameters
Type Name Description
int portalId
AuthMode mode
string service

Fields

OAuthTokenKey

Declaration
protected const string OAuthTokenKey = "oauth_token"
Field Value
Type Description
string

Properties

APIKey

Declaration
protected string APIKey { get; set; }
Property Value
Type Description
string

APIResource

Declaration
protected string APIResource { get; set; }
Property Value
Type Description
string

APISecret

Declaration
protected string APISecret { get; set; }
Property Value
Type Description
string

AccessToken

Declaration
protected string AccessToken { get; set; }
Property Value
Type Description
string

AuthToken

Declaration
protected string AuthToken { get; set; }
Property Value
Type Description
string

AuthTokenExpiry

Declaration
protected TimeSpan AuthTokenExpiry { get; set; }
Property Value
Type Description
TimeSpan

AuthTokenName

Declaration
protected string AuthTokenName { get; set; }
Property Value
Type Description
string

AuthorizationEndpoint

Declaration
protected Uri AuthorizationEndpoint { get; set; }
Property Value
Type Description
Uri

AutoMatchExistingUsers

Declaration
public virtual bool AutoMatchExistingUsers { get; }
Property Value
Type Description
bool

CallbackUri

Declaration
public Uri CallbackUri { get; set; }
Property Value
Type Description
Uri

MeGraphEndpoint

Declaration
protected Uri MeGraphEndpoint { get; set; }
Property Value
Type Description
Uri

Mode

Declaration
protected AuthMode Mode { get; set; }
Property Value
Type Description
AuthMode

OAuthHeaderCode

Declaration
protected string OAuthHeaderCode { get; set; }
Property Value
Type Description
string

OAuthVerifier

Declaration
protected string OAuthVerifier { get; }
Property Value
Type Description
string

OAuthVersion

Declaration
protected string OAuthVersion { get; set; }
Property Value
Type Description
string

PrefixServiceToUserName

Declaration
public virtual bool PrefixServiceToUserName { get; }
Property Value
Type Description
bool

RequestTokenEndpoint

Declaration
protected Uri RequestTokenEndpoint { get; set; }
Property Value
Type Description
Uri

RequestTokenMethod

Declaration
protected HttpMethod RequestTokenMethod { get; set; }
Property Value
Type Description
HttpMethod

Scope

Declaration
protected string Scope { get; set; }
Property Value
Type Description
string

Service

Declaration
public string Service { get; set; }
Property Value
Type Description
string

TokenEndpoint

Declaration
protected Uri TokenEndpoint { get; set; }
Property Value
Type Description
Uri

TokenMethod

Declaration
protected HttpMethod TokenMethod { get; set; }
Property Value
Type Description
HttpMethod

TokenSecret

Declaration
protected string TokenSecret { get; set; }
Property Value
Type Description
string

UserGuid

Declaration
protected string UserGuid { get; set; }
Property Value
Type Description
string

UserGuidKey

Declaration
protected virtual string UserGuidKey { get; }
Property Value
Type Description
string

VerificationCode

Declaration
protected string VerificationCode { get; }
Property Value
Type Description
string

Methods

AuthenticateUser(UserData, PortalSettings, string, Action<NameValueCollection>, Action<UserAuthenticatedEventArgs>)

Declaration
public virtual void AuthenticateUser(UserData user, PortalSettings settings, string ipAddress, Action<NameValueCollection> addCustomProperties, Action<UserAuthenticatedEventArgs> onAuthenticated)
Parameters
Type Name Description
UserData user
PortalSettings settings
string ipAddress
Action<NameValueCollection> addCustomProperties
Action<UserAuthenticatedEventArgs> onAuthenticated

Authorize()

Declaration
public virtual AuthorisationResult Authorize()
Returns
Type Description
AuthorisationResult

GenerateNonce()

Declaration
protected virtual string GenerateNonce()
Returns
Type Description
string

GenerateSignature(Uri, string, string, string, string, string, string, string, out string, out List<QueryParameter>)

Declaration
public string GenerateSignature(Uri url, string token, string tokenSecret, string callbackurl, string oauthVerifier, string httpMethod, string timeStamp, string nonce, out string normalizedUrl, out List<QueryParameter> requestParameters)
Parameters
Type Name Description
Uri url
string token
string tokenSecret
string callbackurl
string oauthVerifier
string httpMethod
string timeStamp
string nonce
string normalizedUrl
List<QueryParameter> requestParameters
Returns
Type Description
string

GenerateTimeStamp()

Declaration
protected virtual string GenerateTimeStamp()
Returns
Type Description
string

GetCurrentUser<TUserData>()

Declaration
public virtual TUserData GetCurrentUser<TUserData>() where TUserData : UserData
Returns
Type Description
TUserData
Type Parameters
Name Description
TUserData

GetExpiry(string)

Declaration
protected virtual TimeSpan GetExpiry(string responseText)
Parameters
Type Name Description
string responseText
Returns
Type Description
TimeSpan

GetToken(string)

Declaration
protected virtual string GetToken(string responseText)
Parameters
Type Name Description
string responseText
Returns
Type Description
string

HaveVerificationCode()

Declaration
public bool HaveVerificationCode()
Returns
Type Description
bool

IsCurrentService()

Declaration
public bool IsCurrentService()
Returns
Type Description
bool

IsCurrentUserAuthorized()

Declaration
public bool IsCurrentUserAuthorized()
Returns
Type Description
bool

LoadTokenCookie(string)

Declaration
protected void LoadTokenCookie(string suffix)
Parameters
Type Name Description
string suffix

RemoveToken()

Declaration
public void RemoveToken()

UrlEncode(string)

Declaration
public static string UrlEncode(string value)
Parameters
Type Name Description
string value
Returns
Type Description
string

Extension Methods

JsonExtensionsWeb.ToJson(object)
Back to top by the community, for the community... #DNNCMS