login

package
v0.23.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package login provides the defined CLI login actions for Vela.

Usage:

import "github.com/go-vela/cli/action/login"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeResponse added in v0.7.0

type CodeResponse struct {
	Code  string
	State string
}

type Config

type Config struct {
	Action       string
	Address      string
	AccessToken  string
	RefreshToken string
	// contains filtered or unexported fields
}

Config represents the configuration necessary to perform login related requests with Vela.

func (*Config) Login

func (c *Config) Login(client *vela.Client) error

Login authenticates and logs in to Vela via the API based off the provided configuration.

func (*Config) PromptBrowserConfirm added in v0.7.0

func (c *Config) PromptBrowserConfirm(in io.ReadCloser) error

PromptBrowserConfirm provides a prompt to confirm opening a browser window.

func (*Config) PromptConfigConfirm added in v0.7.0

func (c *Config) PromptConfigConfirm(in io.ReadCloser) error

PromptConfigConfirm provides a prompt to confirm config generation.

func (*Config) StartServer added in v0.7.0

func (c *Config) StartServer() error

StartServer starts a local server as part of the auth flow. It will handle the callback.

func (*Config) Tokens added in v0.7.0

func (c *Config) Tokens(client *vela.Client, addr string) error

Tokens will wait for the callback and make a request to exchange the the callback payload for an access token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL