Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdentityClientWrapper ¶
type IdentityClientWrapper struct { ValidDomains []string // contains filtered or unexported fields }
IdentityClientWrapper is a wrapper around an IdentityClient.
func (*IdentityClientWrapper) DeclaredIdentity ¶
func (m *IdentityClientWrapper) DeclaredIdentity(ctx context.Context, declared map[string]string) (identchecker.Identity, error)
DeclaredIdentity performs a check of the Candid domain before returning the declared identity.
func (*IdentityClientWrapper) IdentityFromContext ¶
func (m *IdentityClientWrapper) IdentityFromContext(ctx context.Context) (identchecker.Identity, []checkers.Caveat, error)
IdentityFromContext returns the identity from the preovided context.
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier contains everything needed to verify a request.
func NewVerifier ¶
func NewVerifier(authEndpoint string, authPubkey string, expiry int64, domains string) (*Verifier, error)
NewVerifier returns a new Candid verifier.
func (*Verifier) WriteRequest ¶
func (v *Verifier) WriteRequest(r *http.Request, w http.ResponseWriter, derr *bakery.DischargeRequiredError)
WriteRequest writes the required response to trigger Candid authentication.
Click to show internal directories.
Click to hide internal directories.