auth

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package auth implements the authentication flow to login to Axiom by visiting a URL. A personal token is retrieved in exchange.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(ctx context.Context, clientID, baseURL string, loginFunc LoginFunc) (string, error)

Login to the given Axiom deployment and retrieve a personal token in exchange. This will execute the OAuth2 Authorization Code Flow with Proof Key for Code Exchange (PKCE).

Types

type LoginFunc

type LoginFunc func(ctx context.Context, loginURL string) error

LoginFunc is a function that is called with the URL the user has to visit in order to authenticate.

Directories

Path Synopsis
Package assets contains assets for the auth package.
Package assets contains assets for the auth package.
Package PKCE implements Proof Key for Code Exchange by OAuth Public Clients.
Package PKCE implements Proof Key for Code Exchange by OAuth Public Clients.

Jump to

Keyboard shortcuts

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