zts

package
v0.0.0-...-b87988d Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

Index

Constants

View Source
const (
	DefaultURL = "https://zts.athenz.ouroath.com:4443"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client for Athenz ZTS, an authentication token service.

func NewClient

func NewClient(client httputil.Client, domain, serviceURL string) (*Client, error)

NewClient creates a new client for an Athenz ZTS service located at serviceURL.

func (*Client) AccessToken

func (c *Client) AccessToken() (Token, error)

AccessToken returns an access token within the domain configured in client c.

func (*Client) Authenticate

func (c *Client) Authenticate(request *http.Request) error

type Token

type Token struct {
	Value     string
	ExpiresAt time.Time
}

Token is an access token retrieved from ZTS.

Jump to

Keyboard shortcuts

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