package credential
import "github.com/Azure/azure-sdk-for-go/sdk/internal/test/credential"
Index ¶
Functions ¶
func New ¶
func New(*NewOptions) (azcore.TokenCredential, error)
New constructs an azcore.TokenCredential for use in tests
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 ¶
func (Fake) GetToken(context.Context, policy.TokenRequestOptions) (azcore.AccessToken, error)
GetToken returns a fake access token
type NewOptions ¶
type NewOptions struct{}
Source Files ¶
- Version
- v1.9.1
- Published
- Jul 2, 2024
- Platform
- windows/amd64
- Imports
- 7 packages
- Last checked
- 2 hours ago –
Tools for package owners.