Table of Contents

Class OAuth1Authenticator

Namespace
RestSharp.Authenticators
Assembly
RestSharp.dll
public class OAuth1Authenticator : IAuthenticator
Inheritance
OAuth1Authenticator
Implements
Inherited Members

Constructors

OAuth1Authenticator()

public OAuth1Authenticator()

Properties

CallbackUrl

public virtual string? CallbackUrl { get; set; }

Property Value

string

ClientPassword

public virtual string? ClientPassword { get; set; }

Property Value

string

ClientUsername

public virtual string? ClientUsername { get; set; }

Property Value

string

ConsumerKey

public virtual string? ConsumerKey { get; set; }

Property Value

string

ConsumerSecret

public virtual string? ConsumerSecret { get; set; }

Property Value

string

ParameterHandling

public virtual OAuthParameterHandling ParameterHandling { get; set; }

Property Value

OAuthParameterHandling

Realm

public virtual string? Realm { get; set; }

Property Value

string

SessionHandle

public virtual string? SessionHandle { get; set; }

Property Value

string

SignatureMethod

public virtual OAuthSignatureMethod SignatureMethod { get; set; }

Property Value

OAuthSignatureMethod

SignatureTreatment

public virtual OAuthSignatureTreatment SignatureTreatment { get; set; }

Property Value

OAuthSignatureTreatment

Token

public virtual string? Token { get; set; }

Property Value

string

TokenSecret

public virtual string? TokenSecret { get; set; }

Property Value

string

Type

public virtual OAuthType Type { get; set; }

Property Value

OAuthType

Verifier

public virtual string? Verifier { get; set; }

Property Value

string

Version

public virtual string? Version { get; set; }

Property Value

string

Methods

Authenticate(RestClient, RestRequest)

public ValueTask Authenticate(RestClient client, RestRequest request)

Parameters

client RestClient
request RestRequest

Returns

ValueTask

ForAccessToken(string, string?, string, string, OAuthSignatureMethod)

public static OAuth1Authenticator ForAccessToken(string consumerKey, string? consumerSecret, string token, string tokenSecret, OAuthSignatureMethod signatureMethod = OAuthSignatureMethod.HmacSha1)

Parameters

consumerKey string
consumerSecret string
token string
tokenSecret string
signatureMethod OAuthSignatureMethod

Returns

OAuth1Authenticator

ForAccessToken(string, string?, string, string, string)

public static OAuth1Authenticator ForAccessToken(string consumerKey, string? consumerSecret, string token, string tokenSecret, string verifier)

Parameters

consumerKey string
consumerSecret string
token string
tokenSecret string
verifier string

Returns

OAuth1Authenticator

ForAccessTokenRefresh(string, string?, string, string, string)

public static OAuth1Authenticator ForAccessTokenRefresh(string consumerKey, string? consumerSecret, string token, string tokenSecret, string sessionHandle)

Parameters

consumerKey string
consumerSecret string
token string
tokenSecret string
sessionHandle string

Returns

OAuth1Authenticator

ForAccessTokenRefresh(string, string?, string, string, string, string)

public static OAuth1Authenticator ForAccessTokenRefresh(string consumerKey, string? consumerSecret, string token, string tokenSecret, string verifier, string sessionHandle)

Parameters

consumerKey string
consumerSecret string
token string
tokenSecret string
verifier string
sessionHandle string

Returns

OAuth1Authenticator

ForClientAuthentication(string, string?, string, string, OAuthSignatureMethod)

public static OAuth1Authenticator ForClientAuthentication(string consumerKey, string? consumerSecret, string username, string password, OAuthSignatureMethod signatureMethod = OAuthSignatureMethod.HmacSha1)

Parameters

consumerKey string
consumerSecret string
username string
password string
signatureMethod OAuthSignatureMethod

Returns

OAuth1Authenticator

ForProtectedResource(string, string?, string, string, OAuthSignatureMethod)

public static OAuth1Authenticator ForProtectedResource(string consumerKey, string? consumerSecret, string accessToken, string accessTokenSecret, OAuthSignatureMethod signatureMethod = OAuthSignatureMethod.HmacSha1)

Parameters

consumerKey string
consumerSecret string
accessToken string
accessTokenSecret string
signatureMethod OAuthSignatureMethod

Returns

OAuth1Authenticator

ForRequestToken(string, string?, OAuthSignatureMethod)

public static OAuth1Authenticator ForRequestToken(string consumerKey, string? consumerSecret, OAuthSignatureMethod signatureMethod = OAuthSignatureMethod.HmacSha1)

Parameters

consumerKey string
consumerSecret string
signatureMethod OAuthSignatureMethod

Returns

OAuth1Authenticator

ForRequestToken(string, string?, string)

public static OAuth1Authenticator ForRequestToken(string consumerKey, string? consumerSecret, string callbackUrl)

Parameters

consumerKey string
consumerSecret string
callbackUrl string

Returns

OAuth1Authenticator

See Also