auth

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const AuthNEndpointOverrideEnvVarName = "FUSION_TOKEN_ENDPOINT"
View Source
const DefaultAuthNEndpoint = "https://api.pure1.purestorage.com/oauth2/1.0/token"

Variables

This section is empty.

Functions

func DecryptPrivateKeyWithPassword added in v1.0.16

func DecryptPrivateKeyWithPassword(privateKeyString, privateKeyPassword string) (*rsa.PrivateKey, error)

func GetPure1SelfSignedAccessTokenGoodForOneHour

func GetPure1SelfSignedAccessTokenGoodForOneHour(ctx context.Context, issuerId, privateKeyString, authNEndpoint, privateKeyPassword string) (string, error)

Connects to Pure1 Authentication endpoint with issuerID signed with private key specified by given path This returns an access token that is good for one hour, in any exceptional cases it returns an empty string privateKeyPassword is not a mandatory, it can be empty if private key doesn't encrypted

func ReadPrivateKeyFile added in v1.0.16

func ReadPrivateKeyFile(privateKeyPath string) (string, error)

func StringToPrivateKey added in v1.0.16

func StringToPrivateKey(privateKeyString, privateKeyPassword string) (*rsa.PrivateKey, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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