Documentation ¶
Index ¶
- Constants
- Variables
- func NewTesterClient(testerEndpoint string) *config.OAuthClientConfig
- type EndpointsProvider
- type TesterResult
- type TesterStore
- func (s *TesterStore) CreateResult(ctx context.Context, appID config.AppID, result *TesterResult) (*TesterResult, error)
- func (s *TesterStore) CreateToken(ctx context.Context, appID config.AppID, returnURI string) (*TesterToken, error)
- func (s *TesterStore) GetResult(ctx context.Context, appID config.AppID, resultID string) (*TesterResult, error)
- func (s *TesterStore) GetToken(ctx context.Context, appID config.AppID, tokenID string, consume bool) (*TesterToken, error)
- type TesterToken
Constants ¶
View Source
const (
ClientIDTester string = "tester"
)
View Source
const ResultLifetime = duration.UserInteraction
View Source
const TokenLifetime = duration.Short
Variables ¶
View Source
var DependencySet = wire.NewSet( wire.Struct(new(TesterStore), "*"), )
View Source
var ErrResultNotFound = errors.New("tester result not found")
View Source
var ErrTokenNotFound = errors.New("tester token not found")
Functions ¶
func NewTesterClient ¶
func NewTesterClient(testerEndpoint string) *config.OAuthClientConfig
Types ¶
type EndpointsProvider ¶
type TesterResult ¶
type TesterResult struct { ID string `json:"id"` ReturnURI string `json:"return_uri"` UserInfo map[string]interface{} `json:"user_info"` }
func NewTesterResultFromToken ¶
func NewTesterResultFromToken(token *TesterToken, userInfo map[string]interface{}) *TesterResult
type TesterStore ¶
type TesterStore struct {
Redis *globalredis.Handle
}
func (*TesterStore) CreateResult ¶
func (s *TesterStore) CreateResult( ctx context.Context, appID config.AppID, result *TesterResult, ) (*TesterResult, error)
func (*TesterStore) CreateToken ¶
func (s *TesterStore) CreateToken( ctx context.Context, appID config.AppID, returnURI string, ) (*TesterToken, error)
func (*TesterStore) GetResult ¶
func (s *TesterStore) GetResult( ctx context.Context, appID config.AppID, resultID string, ) (*TesterResult, error)
type TesterToken ¶
type TesterToken struct { TokenID string `json:"token_id"` ReturnURI string `json:"return_uri"` PKCEVerifier *pkce.Verifier `json:"pkce_verifier"` }
func NewTesterToken ¶
func NewTesterToken(returnURI string) *TesterToken
Source Files ¶
Click to show internal directories.
Click to hide internal directories.