C# 클래스 ServiceStack.Auth.ApiKeyAuthProvider

Enable access to protected Services using API Keys
상속: ServiceStack.Auth.AuthProvider, IAuthWithRequest, IAuthPlugin
파일 보기 프로젝트 열기: ServiceStack/ServiceStack 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DefaultEnvironments string[]
DefaultKeySizeBytes int
DefaultTypes string[]

공개 메소드들

메소드 설명
ApiKeyAuthProvider ( ) : System
ApiKeyAuthProvider ( IAppSettings appSettings ) : System
Authenticate ( IServiceBase authService, IAuthSession session, Authenticate request ) : object
CreateApiKey ( string environment, string keyType, int sizeBytes ) : string
GenerateNewApiKeys ( string userId ) : List
GetSessionKey ( string apiKey ) : string
IsAuthorized ( IAuthSession session, IAuthTokens tokens, Authenticate request = null ) : bool
OnFailedAuthentication ( IAuthSession session, IRequest httpReq, IResponse httpRes ) : void
PreAuthenticate ( IRequest req, IResponse res ) : void
Register ( IAppHost appHost, AuthFeature feature ) : void

보호된 메소드들

메소드 설명
GetApiKey ( IRequest req, string apiKey ) : ApiKey
Init ( IAppSettings appSettings = null ) : void
ValidateApiKey ( ApiKey apiKey ) : void

비공개 메소드들

메소드 설명
PreAuthenticateWithApiKey ( IRequest req, IResponse res, ApiKey apiKey ) : void

메소드 상세

ApiKeyAuthProvider() 공개 메소드

public ApiKeyAuthProvider ( ) : System
리턴 System

ApiKeyAuthProvider() 공개 메소드

public ApiKeyAuthProvider ( IAppSettings appSettings ) : System
appSettings IAppSettings
리턴 System

Authenticate() 공개 메소드

public Authenticate ( IServiceBase authService, IAuthSession session, Authenticate request ) : object
authService IServiceBase
session IAuthSession
request Authenticate
리턴 object

CreateApiKey() 공개 메소드

public CreateApiKey ( string environment, string keyType, int sizeBytes ) : string
environment string
keyType string
sizeBytes int
리턴 string

GenerateNewApiKeys() 공개 메소드

public GenerateNewApiKeys ( string userId ) : List
userId string
리턴 List

GetApiKey() 보호된 메소드

protected GetApiKey ( IRequest req, string apiKey ) : ApiKey
req IRequest
apiKey string
리턴 ApiKey

GetSessionKey() 공개 정적인 메소드

public static GetSessionKey ( string apiKey ) : string
apiKey string
리턴 string

Init() 보호된 메소드

protected Init ( IAppSettings appSettings = null ) : void
appSettings IAppSettings
리턴 void

IsAuthorized() 공개 메소드

public IsAuthorized ( IAuthSession session, IAuthTokens tokens, Authenticate request = null ) : bool
session IAuthSession
tokens IAuthTokens
request Authenticate
리턴 bool

OnFailedAuthentication() 공개 메소드

public OnFailedAuthentication ( IAuthSession session, IRequest httpReq, IResponse httpRes ) : void
session IAuthSession
httpReq IRequest
httpRes IResponse
리턴 void

PreAuthenticate() 공개 메소드

public PreAuthenticate ( IRequest req, IResponse res ) : void
req IRequest
res IResponse
리턴 void

Register() 공개 메소드

public Register ( IAppHost appHost, AuthFeature feature ) : void
appHost IAppHost
feature AuthFeature
리턴 void

ValidateApiKey() 보호된 메소드

protected ValidateApiKey ( ApiKey apiKey ) : void
apiKey ApiKey
리턴 void

프로퍼티 상세

DefaultEnvironments 공개적으로 정적으로 프로퍼티

public static string[] DefaultEnvironments
리턴 string[]

DefaultKeySizeBytes 공개적으로 정적으로 프로퍼티

public static int DefaultKeySizeBytes
리턴 int

DefaultTypes 공개적으로 정적으로 프로퍼티

public static string[] DefaultTypes
리턴 string[]