internal

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 14 Imported by: 0

README

Internal for Key Vault SDKs

This module contains shared code for all the Key Vault SDKs, mainly the challenge authentication policy.

Documentation

Overview

Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseID added in v0.3.0

func ParseID(id *string) (*string, *string, *string)

ParseID parses "https://myvaultname.vault.azure.net/keys/key1053998307/b86c2e6ad9054f4abf69cc185b99aa60" into "https://myvaultname.managedhsm.azure.net/", "key1053998307", and "b86c2e6ad9054f4abf69cc185b99aa60"

Types

type AcquireResource

type AcquireResource[TResource any, TState any] func(state TState) (newResource TResource, newExpiration time.Time, err error)

AcquireResource abstracts a method for refreshing an expiring resource.

type ExpiringResource

type ExpiringResource[TResource any, TState any] struct {
	// contains filtered or unexported fields
}

ExpiringResource is a temporal resource (usually a credential), that requires periodic refreshing.

func NewExpiringResource

func NewExpiringResource[TResource any, TState any](ar AcquireResource[TResource, TState]) *ExpiringResource[TResource, TState]

NewExpiringResource creates a new ExpiringResource that uses the specified AcquireResource for refreshing.

func (*ExpiringResource[TResource, TState]) GetResource

func (er *ExpiringResource[TResource, TState]) GetResource(state TState) (TResource, error)

GetResource returns the underlying resource. If the resource is fresh, no refresh is performed.

func (*ExpiringResource[TResource, TState]) Reset

func (er *ExpiringResource[TResource, TState]) Reset()

type KeyVaultChallengePolicy

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

func NewKeyVaultChallengePolicy

func NewKeyVaultChallengePolicy(cred azcore.TokenCredential) *KeyVaultChallengePolicy

func (*KeyVaultChallengePolicy) Do

Jump to

Keyboard shortcuts

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