Documentation ¶
Index ¶
- Constants
- func DecryptPrivateKeyWithPassword(privateKeyString, privateKeyPassword string) (*rsa.PrivateKey, error)
- func GetPure1SelfSignedAccessTokenGoodForOneHour(ctx context.Context, ...) (string, error)
- func ReadPrivateKeyFile(privateKeyPath string) (string, error)
- func StringToPrivateKey(privateKeyString, privateKeyPassword string) (*rsa.PrivateKey, error)
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 StringToPrivateKey ¶ added in v1.0.16
func StringToPrivateKey(privateKeyString, privateKeyPassword string) (*rsa.PrivateKey, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.