nativeauth

package
v0.1.60 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nativeauth adapts native login processes to the product's existing flow-scoped auth API. Each connection owns a private credential directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureURL

func CaptureURL(flow *agent.AuthFlow, line string, hosts ...string)

CaptureURL exposes only an allowlisted authorization URL, never raw process output. Optional callback relay is bound to this URL's exact loopback + state.

func LoginCommand

func LoginCommand(flow *agent.AuthFlow, binary string, args []string, env map[string]string, hosts ...string) error

Types

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

func New

func New(config Config, store agent.CredStore) *Auth

func (*Auth) Active

func (a *Auth) Active() bool

func (*Auth) Begin

func (a *Auth) Begin(ctx context.Context, method string) (agent.AuthState, error)

func (*Auth) Callback

func (a *Auth) Callback(_ context.Context, id, raw string) (agent.AuthState, error)

func (*Auth) EnvForRun

func (a *Auth) EnvForRun() map[string]string

func (*Auth) Logout

func (a *Auth) Logout(ctx context.Context) error

func (*Auth) Methods

func (a *Auth) Methods() []agent.AuthMethod

func (*Auth) PrepareAuth

func (a *Auth) PrepareAuth(context.Context) error

func (*Auth) Status

func (a *Auth) Status(ctx context.Context) agent.AuthStatus

func (*Auth) Step

func (a *Auth) Step(_ context.Context, input map[string]string) (agent.AuthState, error)

type Config

type Config struct {
	ID, Name, KeyEnv string
	Logins           []agent.AuthMethod
	Environment      func(string) map[string]string
	Login            func(*agent.AuthFlow, map[string]string) error
	Verify           func(context.Context, map[string]string) bool
	Logout           func(context.Context, map[string]string) error
}

Jump to

Keyboard shortcuts

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