Documentation ¶
Index ¶
- type TestProvider
- func (p *TestProvider) CompleteAuth(data objx.Map) (*common.Credentials, error)
- func (p *TestProvider) DisplayName() string
- func (p *TestProvider) Get(creds *common.Credentials, endpoint string) (objx.Map, error)
- func (p *TestProvider) GetBeginAuthURL(state *common.State, options objx.Map) (string, error)
- func (p *TestProvider) GetClient(creds *common.Credentials) (*http.Client, error)
- func (p *TestProvider) GetUser(creds *common.Credentials) (common.User, error)
- func (p *TestProvider) Name() string
- func (p *TestProvider) PublicData(options map[string]interface{}) (publicData interface{}, err error)
- type TestTripper
- type TestTripperFactory
- type TestUser
- func (u *TestUser) AuthCode() string
- func (u *TestUser) AvatarURL() string
- func (u *TestUser) Data() objx.Map
- func (u *TestUser) Email() string
- func (u *TestUser) IDForProvider(provider string) string
- func (u *TestUser) Name() string
- func (u *TestUser) Nickname() string
- func (u *TestUser) ProviderCredentials() map[string]*common.Credentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestProvider ¶
func (*TestProvider) CompleteAuth ¶
func (p *TestProvider) CompleteAuth(data objx.Map) (*common.Credentials, error)
CompleteAuth takes a map of arguments that are used to complete the authorisation process, completes it, and returns the appropriate common.Credentials.
func (*TestProvider) DisplayName ¶
func (p *TestProvider) DisplayName() string
DisplayName is the human readable name for this provider.
func (*TestProvider) Get ¶
func (p *TestProvider) Get(creds *common.Credentials, endpoint string) (objx.Map, error)
func (*TestProvider) GetBeginAuthURL ¶
GetBeginAuthURL gets the URL that the client must visit in order to begin the authentication process.
func (*TestProvider) GetClient ¶
func (p *TestProvider) GetClient(creds *common.Credentials) (*http.Client, error)
GetClient gets an http.Client authenticated with the specified common.Credentials.
func (*TestProvider) GetUser ¶
func (p *TestProvider) GetUser(creds *common.Credentials) (common.User, error)
GetUser uses the specified common.Credentials to access the users profile from the remote provider, and builds the appropriate User object.
func (*TestProvider) Name ¶
func (p *TestProvider) Name() string
Name is the unique name for this provider.
func (*TestProvider) PublicData ¶
func (p *TestProvider) PublicData(options map[string]interface{}) (publicData interface{}, err error)
type TestTripper ¶
func (*TestTripper) Credentials ¶
func (t *TestTripper) Credentials() *common.Credentials
func (*TestTripper) Provider ¶
func (t *TestTripper) Provider() common.Provider
type TestTripperFactory ¶
func (*TestTripperFactory) NewTripper ¶
func (t *TestTripperFactory) NewTripper(creds *common.Credentials, provider common.Provider) (common.Tripper, error)
type TestUser ¶
func (*TestUser) AuthCode ¶
AuthCode gets this user's globally unique ID (generated by the host program)
func (*TestUser) IDForProvider ¶
IDForProvider gets the ID value for the specified provider name for this user from the ProviderCredentials data.
func (*TestUser) ProviderCredentials ¶
func (u *TestUser) ProviderCredentials() map[string]*common.Credentials
ProviderCredentials gets a map of Credentials (by provider name).