C# 클래스 HttpServer.Authentication.AuthenticationProvider

Provides authentication in the web server.
To initiate authentication you just need to throw a Una
파일 보기 프로젝트 열기: NyxStudios/HttpServer 1 사용 예제들

공개 메소드들

메소드 설명
Add ( IAuthenticator authenticator ) : void

Add a authenticator.

Authenticate ( IRequest request ) : IAuthenticationUser

Authenticate request.

Requires that a AuthorizationHeader have been sent by the client. If not, request one by sending a WWW-Authentication header (can be generated by the Challenge method).

CreateChallenge ( IResponse response, string realm ) : void

Create a challenge header (WWW-authenticate)

Scheme can currently be basic or digest. Basic is not very safe, but easier to use. Digest is quite safe.

메소드 상세

Add() 공개 메소드

Add a authenticator.
public Add ( IAuthenticator authenticator ) : void
authenticator IAuthenticator
리턴 void

Authenticate() 공개 메소드

Authenticate request.
Requires that a AuthorizationHeader have been sent by the client. If not, request one by sending a WWW-Authentication header (can be generated by the Challenge method).
Authorization header was not found in the request. Requested authentication scheme is not supported.
public Authenticate ( IRequest request ) : IAuthenticationUser
request IRequest
리턴 IAuthenticationUser

CreateChallenge() 공개 메소드

Create a challenge header (WWW-authenticate)

Scheme can currently be basic or digest. Basic is not very safe, but easier to use. Digest is quite safe.

Requested scheme is not supported.
public CreateChallenge ( IResponse response, string realm ) : void
response IResponse Response that the authentication header should be added to
realm string Realm that the user should authenticate in
리턴 void