Documentation ¶
Index ¶
- type DeviceCode
- type DeviceCodeFlow
- func (f *DeviceCodeFlow) AccessToken() *api.Token
- func (f *DeviceCodeFlow) ExpiresIn() time.Duration
- func (f *DeviceCodeFlow) GetDeviceCode(ctx context.Context) error
- func (f *DeviceCodeFlow) GetUserCode() string
- func (f *DeviceCodeFlow) GetVerificationURI() string
- func (f *DeviceCodeFlow) GetVerificationURIComplete() string
- func (f *DeviceCodeFlow) Interval() time.Duration
- func (f *DeviceCodeFlow) Reader() io.Reader
- func (f *DeviceCodeFlow) RequestAccessToken(ctx context.Context) (bool, error)
- func (f *DeviceCodeFlow) TokenReader() io.Reader
- type DeviceCodeOption
- func WithAudience(audience string) DeviceCodeOption
- func WithClientID(id string) DeviceCodeOption
- func WithDeviceAuthorizationURL(url string) DeviceCodeOption
- func WithGrantType(grantType string) DeviceCodeOption
- func WithScope(scopes ...string) DeviceCodeOption
- func WithTokenURL(url string) DeviceCodeOption
- type TokenRequest
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceCode ¶
type DeviceCodeFlow ¶
type DeviceCodeFlow struct { DeviceAuthorizationURL string TokenURL string ClientID string Audience string GrantType string Scopes []string // contains filtered or unexported fields }
func New ¶
func New(opts ...DeviceCodeOption) *DeviceCodeFlow
func (*DeviceCodeFlow) AccessToken ¶
func (f *DeviceCodeFlow) AccessToken() *api.Token
func (*DeviceCodeFlow) ExpiresIn ¶
func (f *DeviceCodeFlow) ExpiresIn() time.Duration
func (*DeviceCodeFlow) GetDeviceCode ¶
func (f *DeviceCodeFlow) GetDeviceCode(ctx context.Context) error
func (*DeviceCodeFlow) GetUserCode ¶
func (f *DeviceCodeFlow) GetUserCode() string
func (*DeviceCodeFlow) GetVerificationURI ¶
func (f *DeviceCodeFlow) GetVerificationURI() string
func (*DeviceCodeFlow) GetVerificationURIComplete ¶
func (f *DeviceCodeFlow) GetVerificationURIComplete() string
func (*DeviceCodeFlow) Interval ¶
func (f *DeviceCodeFlow) Interval() time.Duration
func (*DeviceCodeFlow) Reader ¶
func (f *DeviceCodeFlow) Reader() io.Reader
func (*DeviceCodeFlow) RequestAccessToken ¶
func (f *DeviceCodeFlow) RequestAccessToken(ctx context.Context) (bool, error)
func (*DeviceCodeFlow) TokenReader ¶
func (f *DeviceCodeFlow) TokenReader() io.Reader
type DeviceCodeOption ¶
type DeviceCodeOption func(*DeviceCodeFlow)
func WithAudience ¶
func WithAudience(audience string) DeviceCodeOption
func WithClientID ¶
func WithClientID(id string) DeviceCodeOption
func WithDeviceAuthorizationURL ¶
func WithDeviceAuthorizationURL(url string) DeviceCodeOption
func WithGrantType ¶
func WithGrantType(grantType string) DeviceCodeOption
func WithScope ¶
func WithScope(scopes ...string) DeviceCodeOption
func WithTokenURL ¶
func WithTokenURL(url string) DeviceCodeOption
type TokenRequest ¶
type TokenResponse ¶
type TokenResponse struct { AccessToken string `json:"access_token"` IDToken string `json:"id_token"` RefreshToken string `json:"refresh_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` Error string `json:"error"` ErrorDescription string `json:"error_description"` StatusCode int `json:"status_code"` }
Click to show internal directories.
Click to hide internal directories.