Documentation
¶
Index ¶
- type Authentication
- type Authorizer
- type DefaultImpl
- type DeviceConfirmPrompt
- type DeviceConfirmPromptCallback
- type HTTPClientCustomizer
- type Logger
- type Option
- func WithAppDataStore(minDuration time.Duration) Option
- func WithAutoOpenBrowser(autoOpenBrowser bool) Option
- func WithDeviceConfirmPromptCallback(callback DeviceConfirmPromptCallback) Option
- func WithHTTPClientCustomizer(customizer HTTPClientCustomizer) Option
- func WithLogger(l Logger) Option
- func WithPrefillDeviceCode(prefillDeviceCode bool) Option
- func WithRequireOfflineAccess(requireOfflineAccess bool) Option
- type Tokens
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authorizer ¶
type Authorizer interface {
Authorize(ctx context.Context) (Authentication, error)
Refresh(ctx context.Context, refreshToken string) (Authentication, error)
Logout() error
}
type DefaultImpl ¶
type DefaultImpl struct {
// contains filtered or unexported fields
}
func (*DefaultImpl) Authorize ¶
func (a *DefaultImpl) Authorize(ctx context.Context) (Authentication, error)
func (*DefaultImpl) Logout ¶ added in v0.1.4
func (a *DefaultImpl) Logout() error
func (*DefaultImpl) Refresh ¶
func (a *DefaultImpl) Refresh(ctx context.Context, refreshToken string) (Authentication, error)
type DeviceConfirmPrompt ¶
type DeviceConfirmPromptCallback ¶
type DeviceConfirmPromptCallback func(DeviceConfirmPrompt) error
type HTTPClientCustomizer ¶
type Logger ¶
type Logger interface {
Debug(args ...interface{})
Info(args ...interface{})
Warning(args ...interface{})
Error(args ...interface{})
}
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithAppDataStore ¶ added in v0.1.2
func WithAutoOpenBrowser ¶
func WithDeviceConfirmPromptCallback ¶
func WithDeviceConfirmPromptCallback(callback DeviceConfirmPromptCallback) Option
func WithHTTPClientCustomizer ¶
func WithHTTPClientCustomizer(customizer HTTPClientCustomizer) Option
func WithLogger ¶
func WithPrefillDeviceCode ¶
type User ¶
type User struct {
Nickname string `json:"nickname"`
Name string `json:"name"`
Picture string `json:"picture"`
Email string `json:"email"`
EmailVerified bool `json:"email_verified"`
Sub string `json:"sub"`
GivenName string `json:"given_name"`
FamilyName string `json:"family_name"`
MiddleName string `json:"middle_name"`
PreferredUsername string `json:"preferred_username"`
Profile string `json:"profile"`
Website string `json:"website"`
Gender string `json:"gender"`
Birthdate string `json:"birthdate"`
Zoneinfo string `json:"zoneinfo"`
Locale string `json:"locale"`
PhoneNumber string `json:"phone_number"`
PhoneNumberVerified bool `json:"phone_number_verified"`
Address struct {
Country string `json:"country"`
} `json:"address"`
UpdatedAt string `json:"updated_at"`
Permissions []string `json:"permissions"`
}
Click to show internal directories.
Click to hide internal directories.