jwkpb

package
v0.0.0-...-9fa10a5 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_blocky_authz_type_jwk_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type JWK

type JWK struct {
	Use       string   `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"`
	Kty       string   `protobuf:"bytes,2,opt,name=kty,proto3" json:"kty,omitempty"`
	Kid       string   `protobuf:"bytes,3,opt,name=kid,proto3" json:"kid,omitempty"`
	Crv       string   `protobuf:"bytes,4,opt,name=crv,proto3" json:"crv,omitempty"`
	Alg       string   `protobuf:"bytes,5,opt,name=alg,proto3" json:"alg,omitempty"`
	K         []byte   `protobuf:"bytes,6,opt,name=k,proto3" json:"k,omitempty"`
	X         []byte   `protobuf:"bytes,7,opt,name=x,proto3" json:"x,omitempty"`
	Y         []byte   `protobuf:"bytes,8,opt,name=y,proto3" json:"y,omitempty"`
	N         []byte   `protobuf:"bytes,9,opt,name=n,proto3" json:"n,omitempty"`
	E         []byte   `protobuf:"bytes,10,opt,name=e,proto3" json:"e,omitempty"`
	D         []byte   `protobuf:"bytes,11,opt,name=d,proto3" json:"d,omitempty"`
	P         []byte   `protobuf:"bytes,12,opt,name=p,proto3" json:"p,omitempty"`
	Q         []byte   `protobuf:"bytes,13,opt,name=q,proto3" json:"q,omitempty"`
	Dp        []byte   `protobuf:"bytes,14,opt,name=dp,proto3" json:"dp,omitempty"`
	Dq        []byte   `protobuf:"bytes,15,opt,name=dq,proto3" json:"dq,omitempty"`
	Qi        []byte   `protobuf:"bytes,16,opt,name=qi,proto3" json:"qi,omitempty"`
	X5C       [][]byte `protobuf:"bytes,17,rep,name=x5c,proto3" json:"x5c,omitempty"`
	X5U       string   `protobuf:"bytes,18,opt,name=x5u,proto3" json:"x5u,omitempty"`
	X5TSha1   []byte   `protobuf:"bytes,19,opt,name=x5t_sha1,json=x5t,proto3" json:"x5t_sha1,omitempty"`
	X5TSha256 []byte   `protobuf:"bytes,20,opt,name=x5t_sha256,json=x5t#S256,proto3" json:"x5t_sha256,omitempty"`
	// contains filtered or unexported fields
}

JWK represents a JSON Web Key as defined in RFC 7517. https://tools.ietf.org/html/rfc7517; NOTE: this does not unmarshal to JSON directly, as the 'bytes' fields are urlsafe base64 encoded in the JSON representation.

func (*JWK) Descriptor deprecated

func (*JWK) Descriptor() ([]byte, []int)

Deprecated: Use JWK.ProtoReflect.Descriptor instead.

func (*JWK) EcPrivateKey

func (m *JWK) EcPrivateKey() (*ecdsa.PrivateKey, error)

EcPrivateKey returns the ECDSA private key represented by the JWK.

func (*JWK) EcPublicKey

func (m *JWK) EcPublicKey() (*ecdsa.PublicKey, error)

EcPublicKey returns the ECDSA public key represented by the JWK.

func (*JWK) EdPrivateKey

func (m *JWK) EdPrivateKey() (ed25519.PrivateKey, error)

EdPrivateKey returns the Ed25519 private key represented by the JWK.

func (*JWK) EdPublicKey

func (m *JWK) EdPublicKey() (ed25519.PublicKey, error)

EdPublicKey returns the Ed25519 public key represented by the JWK.

func (*JWK) GetAlg

func (x *JWK) GetAlg() string

func (*JWK) GetCrv

func (x *JWK) GetCrv() string

func (*JWK) GetD

func (x *JWK) GetD() []byte

func (*JWK) GetDp

func (x *JWK) GetDp() []byte

func (*JWK) GetDq

func (x *JWK) GetDq() []byte

func (*JWK) GetE

func (x *JWK) GetE() []byte

func (*JWK) GetK

func (x *JWK) GetK() []byte

func (*JWK) GetKid

func (x *JWK) GetKid() string

func (*JWK) GetKty

func (x *JWK) GetKty() string

func (*JWK) GetN

func (x *JWK) GetN() []byte

func (*JWK) GetP

func (x *JWK) GetP() []byte

func (*JWK) GetQ

func (x *JWK) GetQ() []byte

func (*JWK) GetQi

func (x *JWK) GetQi() []byte

func (*JWK) GetUse

func (x *JWK) GetUse() string

func (*JWK) GetX

func (x *JWK) GetX() []byte

func (*JWK) GetX5C

func (x *JWK) GetX5C() [][]byte

func (*JWK) GetX5TSha1

func (x *JWK) GetX5TSha1() []byte

func (*JWK) GetX5TSha256

func (x *JWK) GetX5TSha256() []byte

func (*JWK) GetX5U

func (x *JWK) GetX5U() string

func (*JWK) GetY

func (x *JWK) GetY() []byte

func (*JWK) IsPrivate

func (m *JWK) IsPrivate() bool

IsPrivate returns true if the key is a private key. It returns true either if the value of the JWK is an asymmetric private key, or a symmetric key.

func (*JWK) IsSymmetric

func (m *JWK) IsSymmetric() bool

IsSymmetric returns true if the key is a symmetric key.

func (*JWK) MarshalJSON

func (m *JWK) MarshalJSON() ([]byte, error)

func (*JWK) ProtoMessage

func (*JWK) ProtoMessage()

func (*JWK) ProtoReflect

func (x *JWK) ProtoReflect() protoreflect.Message

func (*JWK) Reset

func (x *JWK) Reset()

func (*JWK) RsaPrivateKey

func (m *JWK) RsaPrivateKey() (*rsa.PrivateKey, error)

RsaPrivateKey returns the RSA private key represented by the JWK. This function returns the value only if the key type is "RSA", and all required fields are set.

func (*JWK) RsaPublicKey

func (m *JWK) RsaPublicKey() (*rsa.PublicKey, error)

RsaPublicKey returns the RSA public key represented by the JWK. This function returns the value only if the key type is "RSA", and all required fields are set.

func (*JWK) String

func (x *JWK) String() string

func (*JWK) SymmetricKey

func (m *JWK) SymmetricKey() ([]byte, error)

SymmetricKey returns the symmetric key represented by the JWK.

func (*JWK) UnmarshalJSON

func (m *JWK) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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