authutils

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(slice []string, val string) bool

ContainsString returns true if the provided value is in the provided slice

func GetDefaultAccessTokenRequest added in v1.0.7

func GetDefaultAccessTokenRequest(host string, path string, token string) (*http.Request, error)

GetDefaultAccessTokenRequest returns a HTTP request to get an access token using a static token

func GetKeyFingerprint

func GetKeyFingerprint(key *rsa.PublicKey) (string, error)

GetKeyFingerprint returns the fingerprint for a given rsa.PublicKey

func GetPubKeyPem

func GetPubKeyPem(key *rsa.PublicKey) (string, error)

GetPubKeyPem returns the PEM encoded public key

func HashSha256

func HashSha256(data []byte) ([]byte, error)

HashSha256 returns the SHA256 hash of the input

func RemoveString

func RemoveString(slice []string, val string) ([]string, bool)

RemoveString removes the provided value from the provided slice

Returns modified slice. If val is not found returns unmodified slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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