Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachingProofService ¶
type CachingProofService struct {
// contains filtered or unexported fields
}
func NewCachingProofService ¶
func NewCachingProofService() *CachingProofService
func (*CachingProofService) RequestAccess ¶
func (ps *CachingProofService) RequestAccess( ctx context.Context, issuer ucan.Signer, audience ucan.Principal, ability ucan.Ability, cause invocation.Invocation, options ...Option, ) (delegation.Delegation, error)
Request access to be granted from the service for the passed ability. A cached delegation may be returned if not expired.
type Option ¶
type Option func(*requestConfig)
func WithConnection ¶
func WithConnection(conn client.Connection) Option
WithConnection configures the connection to use for the request. If set, the HTTP client and service URL options are ignored.
func WithHTTPClient ¶
WithHTTPClient configures a HTTP client to use in the request.
func WithMinimumTTL ¶
WithMinimumTTL configures the minimum TTL a cached delegation should have.
func WithServiceURL ¶
WithServiceURL configures the URL of the service to request from. If not set it will be inferred from the service DID, if it is a did:web.
type ProofService ¶
type ProofService interface {
// Request access to be granted from the service for the passed ability.
RequestAccess(
ctx context.Context,
issuer ucan.Signer,
audience ucan.Principal,
ability ucan.Ability,
cause invocation.Invocation,
options ...Option,
) (delegation.Delegation, error)
}
ProofService requests proofs from other UCAN enabled nodes by making `access/grant` invocations.
Click to show internal directories.
Click to hide internal directories.