package credential

import "github.com/Azure/azure-sdk-for-go/sdk/internal/test/credential"

Index

Functions

func New

New constructs a credential for use in tests. In playback mode, it returns Fake, which always provides valid tokens. In live and record modes, it returns a credential based on the environment:

Types

type Fake

type Fake struct{}

Fake always returns a valid token. Use this type to fake authentication in tests that never send a real request. For live or recorded tests, call New instead.

func (Fake) GetToken

GetToken returns a fake access token

type NewOptions

type NewOptions struct{}

Source Files

credential.go

Version
v1.11.1 (latest)
Published
Apr 7, 2025
Platform
windows/amd64
Imports
7 packages
Last checked
1 hour ago

Tools for package owners.