C# Class CommanderDemo.Web.TokenService

NOT FOR PROD: This class is only for the demo which integrates, MVC, WebAPI, and FluentScheduler Manages Tokens for provided context data like Username. Store as little as possibly in the token, it can get big and is sent on each request.
Inheritance: ITokenService
Show file Open project: Command-R/CommanderDemo

Public Methods

Method Description
CreateToken ( object>.IDictionary data ) : string
DeleteToken ( string tokenId ) : void
GetTokenData ( string tokenId ) : object>.IDictionary
TokenService ( Settings settings ) : System

Private Methods

Method Description
ParseRoles ( Object roles ) : string[]
TryGet ( object>.IDictionary dict, string key ) : object

Method Details

CreateToken() public method

public CreateToken ( object>.IDictionary data ) : string
data object>.IDictionary
return string

DeleteToken() public method

public DeleteToken ( string tokenId ) : void
tokenId string
return void

GetTokenData() public method

public GetTokenData ( string tokenId ) : object>.IDictionary
tokenId string
return object>.IDictionary

TokenService() public method

public TokenService ( Settings settings ) : System
settings Settings
return System