Show / Hide Table of Contents

Class SeltzrOptionsBuilderExtensions

Extension methods for the SeltzrOptionsBuilder<TModel, TUser> class.

Inheritance
Object
SeltzrOptionsBuilderExtensions
Namespace: Seltzr.Extensions
Assembly: Seltzr.dll
Syntax
C#
public static class SeltzrOptionsBuilderExtensions

Methods

| Improve this Doc View Source

Auth<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, Func<IApiContext<TModel, NoUser>, Boolean>)

Adds an auth provider to this route that authenticates with a delegate

C#
public static SeltzrOptionsBuilder<TModel, NoUser> Auth<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, Func<IApiContext<TModel, NoUser>, bool> handler)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

handlerFunc<IApiContext<TModel, NoUser>, Boolean>

The handler which, when given the API request context, will return true if the credentials are valid and false otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthAsync<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, Func<IApiContext<TModel, NoUser>, Task<Boolean>>)

Adds an auth provider to this route that authenticates with a delegate

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthAsync<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, Func<IApiContext<TModel, NoUser>, Task<bool>> handler)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

handlerFunc<IApiContext<TModel, NoUser>, Task<Boolean>>

The handler which, when given the API request context, will return true if the credentials are valid and false otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthBasic<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, Func<String, String, Boolean>)

Adds an auth provider to this route that authenticates with basic auth

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthBasic<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, Func<string, string, bool> handler)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

handlerFunc<String, String, Boolean>

The handler which, when given the username and password, will return true if the value is valid and false otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthBasic<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, String, String)

Adds an auth provider to this route that authenticates with basic auth

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthBasic<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, string username, string password)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

usernameString

The expected value of the username. Authorization will succeed if both this and password value equals the actual values and fail otherwise

passwordString

The expected value of the password. Authorization will succeed if both this and username value equals the actual values and fail otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthBasicAsync<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, Func<String, String, Task<Boolean>>)

Adds an auth provider to this route that authenticates with basic auth

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthBasicAsync<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, Func<string, string, Task<bool>> handler)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

handlerFunc<String, String, Task<Boolean>>

The handler which, when given the username and password, will return true if the value is valid and false otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthHeader<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, String, Func<String, Boolean>)

Adds an auth provider to this route that authenticates with a header

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthHeader<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, string parameterName, Func<string, bool> handler)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

parameterNameString

The name of the header to authenticate with

handlerFunc<String, Boolean>

The handler which, when given the header value, will return true if the value is valid and false otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthHeader<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, String, String)

Adds an auth provider to this route that authenticates with a header

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthHeader<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, string parameterName, string value)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

parameterNameString

The name of the header to authenticate with

valueString

The expected value of the parameter. Authorization will succeed if the parameter value equals value and fail otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthHeaderAsync<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, String, Func<String, Task<Boolean>>)

Adds an auth provider to this route that authenticates with a header

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthHeaderAsync<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, string parameterName, Func<string, Task<bool>> handler)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

parameterNameString

The name of the header to authenticate with

handlerFunc<String, Task<Boolean>>

The handler which, when given the header value, will return true if the value is valid and false otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthQuery<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, String, Func<String, Boolean>)

Adds an auth provider to this route that authenticates with a query parameter

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthQuery<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, string parameterName, Func<string, bool> handler)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

parameterNameString

The name of the parameter to authenticate with

handlerFunc<String, Boolean>

The handler which, when given the parameter value, will return true if the value is valid and false otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthQuery<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, String, String)

Adds an auth provider to this route that authenticates with a query parameter

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthQuery<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, string parameterName, string value)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

parameterNameString

The name of the parameter to authenticate with

valueString

The expected value of the parameter. Authorization will succeed if the parameter value equals value and fail otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

| Improve this Doc View Source

AuthQueryAsync<TModel>(SeltzrOptionsBuilder<TModel, NoUser>, String, Func<String, Task<Boolean>>)

Adds an auth provider to this route that authenticates with a query parameter

C#
public static SeltzrOptionsBuilder<TModel, NoUser> AuthQueryAsync<TModel>(this SeltzrOptionsBuilder<TModel, NoUser> builder, string parameterName, Func<string, Task<bool>> handler)
    where TModel : class
Parameters
builderSeltzrOptionsBuilder<TModel, NoUser>

The options builder to perform the operation on

parameterNameString

The name of the parameter to authenticate with

handlerFunc<String, Task<Boolean>>

The handler which, when given the parameter value, will return true if the value is valid and false otherwise

Returns

SeltzrOptionsBuilder<TModel, NoUser>

This SeltzrOptionsBuilder<TModel, TUser> object, for chaining

Type Parameters
TModel

The model type that the API is being built for

  • Improve this Doc
  • View Source
Back to top Generated by DocFX