Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func New ¶
func New(jwtSecretKey []byte, dataverseClient *dataverse.Client, serviceID string) *Authenticator
func (*Authenticator) Authenticate ¶
Authenticate verifies the provided verifiable credential and issue a related jwt access token if authentication succeeds.
func (*Authenticator) Authorize ¶
func (a *Authenticator) Authorize(token string, uri *fasthttp.URI) (*ProxyClaims, error)
Authorize verifies the provided jwt access token.
type Permissions ¶
type Permissions struct {
Read []string `json:"read"`
}
type ProxyClaims ¶
type ProxyClaims struct { jwt.StandardClaims Can Permissions `json:"can"` }
Click to show internal directories.
Click to hide internal directories.