C# Class HttpServer.Authentication.BasicAuthentication

Implements basic authentication scheme.
Inheritance: IAuthenticator
Datei anzeigen Open project: NyxStudios/HttpServer Class Usage Examples

Public Methods

Method Description
Authenticate ( AuthorizationHeader header, string realm, string httpVerb ) : IAuthenticationUser

An authentication response have been received from the web browser. Check if it's correct

BasicAuthentication ( IUserProvider userProvider ) : System
CreateChallenge ( string realm ) : IHeader

Create a response that can be sent in the WWW-Authenticate header.

Method Details

Authenticate() public method

An authentication response have been received from the web browser. Check if it's correct
if authenticationHeader is invalid If any of the paramters is empty or null.
public Authenticate ( AuthorizationHeader header, string realm, string httpVerb ) : IAuthenticationUser
header HttpServer.Headers.AuthorizationHeader Authorization header
realm string Realm that should be authenticated
httpVerb string GET/POST/PUT/DELETE etc.
return IAuthenticationUser

BasicAuthentication() public method

public BasicAuthentication ( IUserProvider userProvider ) : System
userProvider IUserProvider
return System

CreateChallenge() public method

Create a response that can be sent in the WWW-Authenticate header.
Argument is null.
public CreateChallenge ( string realm ) : IHeader
realm string Realm that the user should authenticate in
return IHeader