C# 클래스 GoatTrip.RestApi.Authentication.BasicAuthenticationModule

This module performs basic authentication. For details on basic authentication see RFC 2617. Based on the work by Mike Volodarsky (www.iis.net/learn/develop/runtime-extensibility/developing-a-module-using-net) The basic operational flow is: On AuthenticateRequest: extract the basic authentication credentials verify the credentials if succesfull, create and send authentication cookie On SendResponseHeaders: if there is no authentication cookie in request, clear response, add unauthorized status code (401) and add the basic authentication challenge to trigger basic authentication.
상속: IHttpModule
파일 보기 프로젝트 열기: NHSChoices/location-service

공개 메소드들

메소드 설명
Dispose ( ) : void
Init ( System.Web.HttpApplication context ) : void

보호된 메소드들

메소드 설명
ExtractBasicCredentials ( string authorizationHeader, string &username, string &password ) : bool
ValidateCredentials ( string userName, string password ) : bool

비공개 메소드들

메소드 설명
AuthenticateUser ( Object source, EventArgs e ) : void
InitCredentials ( string username, string password ) : void
InitExcludes ( Devbridge.BasicAuthentication.Configuration basicAuth ) : void
IsRedirect ( int httpStatusCode ) : bool
IsStatusOK ( int httpStatusCode ) : bool
IssueAuthenticationChallenge ( Object source, EventArgs e ) : void
ShouldChallenge ( HttpContext context ) : bool

Returns true if authentication challenge should be sent to client based on configured exclude rules

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

ExtractBasicCredentials() 보호된 메소드

protected ExtractBasicCredentials ( string authorizationHeader, string &username, string &password ) : bool
authorizationHeader string
username string
password string
리턴 bool

Init() 공개 메소드

public Init ( System.Web.HttpApplication context ) : void
context System.Web.HttpApplication
리턴 void

ValidateCredentials() 보호된 메소드

protected ValidateCredentials ( string userName, string password ) : bool
userName string
password string
리턴 bool