Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Authenticator
NewGitHubApp creates a new GitHub OAuth application for device flow
func (*Authenticator) Authenticate ¶
func (a *Authenticator) Authenticate(ctx context.Context) error
Authenticate performs the complete device flow authentication in the user's terminal and web browser
func (*Authenticator) GetGitHubClient ¶
func (a *Authenticator) GetGitHubClient() (*github.Client, error)
GetGitHubClient returns a GitHub client preconfigured with the logged-in token.
func (*Authenticator) ReadToken ¶
func (a *Authenticator) ReadToken() (string, error)
ReadToken reads the persisted token and returns it
type DeviceCodeResponse ¶
type DeviceCodeResponse struct {
DeviceCode string `json:"device_code"`
UserCode string `json:"user_code"`
VerificationURI string `json:"verification_uri"`
ExpiresIn int `json:"expires_in"`
Interval int `json:"interval"`
}
DeviceCodeResponse models the github device code response
Click to show internal directories.
Click to hide internal directories.