Documentation ¶
Index ¶
- Constants
- Variables
- func JWKCredSerialize(dc DoltCreds) ([]byte, error)
- func JWKCredsWrite(wr io.Writer, dc DoltCreds) error
- func JWKCredsWriteToDir(fs filesys.Filesys, dir string, dc DoltCreds) (string, error)
- func PubKeyStrToKIDStr(pub string) (string, error)
- func PubKeyToKID(pub []byte) []byte
- func PubKeyToKIDStr(pub []byte) string
- type DoltCreds
- func (dc DoltCreds) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
- func (dc DoltCreds) HasPrivKey() bool
- func (dc DoltCreds) IsPrivKeyValid() bool
- func (dc DoltCreds) IsPubKeyValid() bool
- func (dc DoltCreds) KeyIDBase32Str() string
- func (dc DoltCreds) PrivKeyBase32Str() string
- func (dc DoltCreds) PubKeyBase32Str() string
- func (dc DoltCreds) RequireTransportSecurity() bool
- func (dc DoltCreds) Sign(data []byte) []byte
Constants ¶
View Source
const ( B32CharEncoding = "0123456789abcdefghijklmnopqrstuv" B32EncodedPubKeyLen = 52 B32EncodedKeyIdLen = 45 JWTKIDHeader = "kid" JWTAlgHeader = "alg" )
View Source
const (
JWKFileExtension = ".jwk"
)
Variables ¶
View Source
var B32CredsByteSet = set.NewByteSet([]byte(B32CharEncoding))
View Source
var B32CredsEncoding = base32.NewEncoding(B32CharEncoding).WithPadding(base32.NoPadding)
View Source
var EmptyCreds = DoltCreds{}
View Source
var ErrBadB32CredsEncoding = errors.New("bad base32 credentials encoding")
View Source
var ErrCredsNotFound = errors.New("credentials not found")
Functions ¶
func JWKCredSerialize ¶
func JWKCredsWriteToDir ¶
func PubKeyStrToKIDStr ¶
func PubKeyToKID ¶
func PubKeyToKIDStr ¶
Types ¶
type DoltCreds ¶
func GenerateCredentials ¶
func JWKCredsDeserialize ¶
func JWKCredsReadFromFile ¶
func (DoltCreds) GetRequestMetadata ¶
func (DoltCreds) HasPrivKey ¶
func (DoltCreds) IsPrivKeyValid ¶
func (DoltCreds) IsPubKeyValid ¶
func (DoltCreds) KeyIDBase32Str ¶
func (DoltCreds) PrivKeyBase32Str ¶
func (DoltCreds) PubKeyBase32Str ¶
func (DoltCreds) RequireTransportSecurity ¶
Click to show internal directories.
Click to hide internal directories.