Class OAuth2OptionsBuilder
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
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
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
- variableNamestring
- 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
- oauthUrlstring
- 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
- clientIdstring
- 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
- clientSecretstring
- 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
- grantTypestring
- 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
- passwordstring
- 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
- usernamestring
- Value of the parameter with name 'username'. 
Returns
- OAuth2OptionsBuilder
- Updated instance of builder.