public TokenEndPoint( OAuthContext context, AuthorizationCodeStorage authCodeStorage, RefreshTokenStorage refreshTokenStorage) { _context = context; _authorizationCodestorage = authCodeStorage; _refreshTokenStorage = refreshTokenStorage; }
public static async Task<TokenEndPoint> GetTokenEndProint ( IOwinContext owinContext, OAuthOptions options, AuthorizationCodeStorage storage, RefreshTokenStorage refreshTokenStorage ) { var request = new TokenRequest(owinContext); await request.LoadAsync(); var context = new OAuthContext(options, request, owinContext); return new TokenEndPoint(context, storage, refreshTokenStorage); }
public static async Task<Flow> Get ( IOwinContext owinContext, OAuthOptions options, AuthorizationCodeStorage authCodeStorage, RefreshTokenStorage refreshTokenStorage ) { var request = new AuthenticationRequest(owinContext); await request.LoadAsync(); var context = new OAuthContext(options, request, owinContext); switch (context.AuthenticationRequest.response_type?.Trim()) { case "code": return new AuthorizationCodeFlow(context, authCodeStorage); case "id_token": return new ImplicitFlow(context); case "id_token token": return new ImplicitFlow(context); case "code id_token": return new HybridFlow(context); case "code token": return new HybridFlow(context); case "code id_token token": return new HybridFlow(context); default: return null; } }
public AuthorizationCodeFlow(OAuthContext context, AuthorizationCodeStorage authCodeStorage) : base(context) { _authorizationCodestorage = authCodeStorage; }