Documentation ¶
Index ¶
Constants ¶
View Source
const OauthSuccessPage = `` /* 1941-byte string literal not displayed */
View Source
const ResetLine = "\r\033[K"
ResetLine returns the cursor to start of line and clean it
Variables ¶
This section is empty.
Functions ¶
func Flow ¶ added in v0.31.0
func Flow(hostname string, provider AuthProvider) (accessToken string, username string, err error)
Flow - authentication workflow returns access tooken
func NewCmdLogout ¶
NewCmdLogout creates the `auth logout` command
func NewCmdStatus ¶
NewCmdStatus creates the `auth status` command
Types ¶
type AuthProvider ¶
type AuthProvider int
const ( AuthWithGithub AuthProvider = iota AuthWithGitlab // used for requesting more permissions from // github when working with Github repo based // objectives AuthWithGithubWorkflow )
func (AuthProvider) AuthPath ¶ added in v0.31.0
func (p AuthProvider) AuthPath() (s string)
func (AuthProvider) AuthorizeURL ¶
func (p AuthProvider) AuthorizeURL() string
AuthorizeURL returns the URL of the OAuth authorization endpoint
func (AuthProvider) ClientID ¶
func (p AuthProvider) ClientID() string
func (AuthProvider) Scopes ¶
func (p AuthProvider) Scopes() string
func (AuthProvider) String ¶
func (p AuthProvider) String() string
type LoginOptions ¶
type LoginOptions struct { IO *iostreams.IOStreams Interactive bool Hostname string Provider string Token string }
func (*LoginOptions) GetToken ¶ added in v0.31.0
func (l *LoginOptions) GetToken() string
implement utils.TokenReader interface
func (*LoginOptions) Reader ¶ added in v0.31.0
func (l *LoginOptions) Reader() io.ReadCloser
func (*LoginOptions) SetToken ¶ added in v0.31.0
func (l *LoginOptions) SetToken(t string)
type LogoutOptions ¶
Click to show internal directories.
Click to hide internal directories.