Table of Contents

Class OAuth2OptionsBuilder

Namespace
TeaPie.Http.Auth.OAuth2
Assembly
TeaPie.dll
public sealed class OAuth2OptionsBuilder
Inheritance
OAuth2OptionsBuilder
Inherited Members
Extension Methods

Methods

AddParameter(string, string)

Adds an additional parameter with key and value.

public OAuth2OptionsBuilder AddParameter(string key, string value)

Parameters

key string

The key of the additional parameter.

value string

The value of the additional parameter.

Returns

OAuth2OptionsBuilder

Updated instance of builder.

Build()

Creates OAuth2Options according to configuration of the builder.

public OAuth2Options Build()

Returns

OAuth2Options

Options for OAuth2 provider.

Create()

public static OAuth2OptionsBuilder Create()

Returns

OAuth2OptionsBuilder

WithAccessTokenVariableName(string)

Access token will be saved to variable named by variableName. With token change, variable is updated accordingly.

public OAuth2OptionsBuilder WithAccessTokenVariableName(string variableName)

Parameters

variableName string

Name of the variable which will hold access token value.

Returns

OAuth2OptionsBuilder

Updated instance of builder.

WithAuthUrl(string)

Adds URL on which user should be authenticated.

public OAuth2OptionsBuilder WithAuthUrl(string oauthUrl)

Parameters

oauthUrl string

URL on which user should be authenticated.

Returns

OAuth2OptionsBuilder

Updated instance of builder.

WithClientId(string)

Adds 'clientId' parameter with clientId value.

public OAuth2OptionsBuilder WithClientId(string clientId)

Parameters

clientId string

Value of the parameter with name 'clientId'.

Returns

OAuth2OptionsBuilder

Updated instance of builder.

WithClientSecret(string)

Adds 'clientSecret' parameter with clientSecret value.

public OAuth2OptionsBuilder WithClientSecret(string clientSecret)

Parameters

clientSecret string

Value of the parameter with name 'clientSecret'.

Returns

OAuth2OptionsBuilder

Updated instance of builder.

WithGrantType(string)

Specifies which grant type should be used.

public OAuth2OptionsBuilder WithGrantType(string grantType)

Parameters

grantType string

Grant type to be used for authentication.

Returns

OAuth2OptionsBuilder

Updated instance of builder.

WithPassword(string)

Adds 'password' parameter with password value.

public OAuth2OptionsBuilder WithPassword(string password)

Parameters

password string

Value of the parameter with name 'password'.

Returns

OAuth2OptionsBuilder

Updated instance of builder.

WithUsername(string)

Adds 'username' parameter with username value.

public OAuth2OptionsBuilder WithUsername(string username)

Parameters

username string

Value of the parameter with name 'username'.

Returns

OAuth2OptionsBuilder

Updated instance of builder.