credentials

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package credentials provides utilities for working with customer identity credentials and the credentials file.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrJWKSetNotFound = errors.New("jwk not found for kid")
)

nolint: gochecknoglobals

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	ClientID     string
	ClientSecret string
	AccessToken  string
}

Credentials stores Okta service-to-service app credentials

func (Credentials) GetBearerHeader

func (credentials Credentials) GetBearerHeader() string

GetBearerHeader returns an authorization header which should be included if not empty in requests to the resource server

func (*Credentials) RefreshOrRequestAccessToken

func (credentials *Credentials) RefreshOrRequestAccessToken(
	ctx context.Context,
	oktaOrgURL,
	oktaAuthServer string,
	disableOkta bool,
	client *http.Client,
) (tokenUpdated bool, err error)

Jump to

Keyboard shortcuts

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