api

package
v0.0.0-...-df24421 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyTypeRSA       keyType = "RSA"
	KeyTypeECDSA     keyType = "ECDSA"
	KeyTypeEd25519   keyType = "Ed25519"
	KeyTypeX25519    keyType = "X25519"
	KeyTypeSymmetric keyType = "Symmetric"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Inspect

type Inspect struct {
	// contains filtered or unexported fields
}

func (*Inspect) ApplyMiddleware

func (i *Inspect) ApplyMiddleware(h http.Handler) http.Handler

func (*Inspect) Authorize

func (i *Inspect) Authorize(w http.ResponseWriter, r *http.Request) (authorized bool, modified *http.Request)

func (*Inspect) ContentType

func (i *Inspect) ContentType() (request, response string)

func (*Inspect) HTTPMethod

func (i *Inspect) HTTPMethod() string

func (*Inspect) Initialize

func (i *Inspect) Initialize(s server.Server) error

func (*Inspect) Respond

func (i *Inspect) Respond(r *http.Request) (code int, body []byte, err error)

func (*Inspect) URLPattern

func (i *Inspect) URLPattern() string

type InspectReq

type InspectReq struct {
	JWK string `json:"jwk"`
}

func (InspectReq) DefaultsAndValidate

func (i InspectReq) DefaultsAndValidate() (InspectReq, error)

type InspectResp

type InspectResp struct {
	JWK   string `json:"jwk"`
	PKCS8 string `json:"pkcs8"`
	PKIX  string `json:"pkix"`
}

type NewGen

type NewGen struct {
	// contains filtered or unexported fields
}

func (*NewGen) ApplyMiddleware

func (n *NewGen) ApplyMiddleware(h http.Handler) http.Handler

func (*NewGen) Authorize

func (n *NewGen) Authorize(w http.ResponseWriter, r *http.Request) (authorized bool, modified *http.Request)

func (*NewGen) ContentType

func (n *NewGen) ContentType() (request, response string)

func (*NewGen) HTTPMethod

func (n *NewGen) HTTPMethod() string

func (*NewGen) Initialize

func (n *NewGen) Initialize(s server.Server) error

func (*NewGen) Respond

func (n *NewGen) Respond(r *http.Request) (code int, body []byte, err error)

func (*NewGen) URLPattern

func (n *NewGen) URLPattern() string

type NewGenReqData

type NewGenReqData struct {
	ALG     jwkset.ALG      `json:"alg"`
	KEYOPS  []jwkset.KEYOPS `json:"keyops"`
	KeyType keyType         `json:"keyType"`
	KID     string          `json:"kid"`
	USE     jwkset.USE      `json:"use"`

	RSABits int        `json:"rsaBits"`
	ECCurve jwkset.CRV `json:"ecCurve"`
}

func (NewGenReqData) DefaultsAndValidate

func (n NewGenReqData) DefaultsAndValidate() (NewGenReqData, error)

type NewGenRespData

type NewGenRespData struct {
	JWK   string `json:"jwk"`
	PKCS8 string `json:"pkcs8"`
	PKIX  string `json:"pkix"`
}

type PemGen

type PemGen struct {
	// contains filtered or unexported fields
}

func (*PemGen) ApplyMiddleware

func (p *PemGen) ApplyMiddleware(h http.Handler) http.Handler

func (*PemGen) Authorize

func (p *PemGen) Authorize(w http.ResponseWriter, r *http.Request) (authorized bool, modified *http.Request)

func (*PemGen) ContentType

func (p *PemGen) ContentType() (request, response string)

func (*PemGen) HTTPMethod

func (p *PemGen) HTTPMethod() string

func (*PemGen) Initialize

func (p *PemGen) Initialize(s server.Server) error

func (*PemGen) Respond

func (p *PemGen) Respond(r *http.Request) (code int, body []byte, err error)

func (*PemGen) URLPattern

func (p *PemGen) URLPattern() string

type PemGenReqData

type PemGenReqData struct {
	ALG    jwkset.ALG      `json:"alg"`
	KEYOPS []jwkset.KEYOPS `json:"keyops"`
	KID    string          `json:"kid"`
	PEM    string          `json:"pem"`
	USE    jwkset.USE      `json:"use"`
}

func (PemGenReqData) DefaultsAndValidate

func (p PemGenReqData) DefaultsAndValidate() (PemGenReqData, error)

type PemGenRespData

type PemGenRespData struct {
	JWK string `json:"jwk"`
}

Jump to

Keyboard shortcuts

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