tokenserver

package
v0.0.0-...-dbefbc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package artifice provides seqencing of timed triggers for pulling information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTokenHandler

func GetTokenHandler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error)

Types

type TokenServer

type TokenServer struct {
	// contains filtered or unexported fields
}

TokenServer provides token information.

func NewTokenServer

func NewTokenServer(redis *redis.Pool, db *sqlx.DB, clientID, secret string) *TokenServer

NewTokenServer Service.

func (*TokenServer) Close

func (s *TokenServer) Close()

Close the service

func (TokenServer) GetToken

GetToken gets a token from the store and returns it

func (*TokenServer) Run

func (s *TokenServer) Run() error

Run the service

type TokenServerPlan

type TokenServerPlan interface {
	GetToken(ctx context.Context, t *tokenstore.TokenRequest) (*oauth2.Token, error)
}

TokenServerPlan for API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL