Documentation ¶
Index ¶
- Variables
- func ParseResponse[T any](err error, httpResponse *http.Response, ...) (*T, error)
- func UnwrapAPIError(err error) error
- func WithAdditionalCredentials(ctx context.Context, credentials []vc.VerifiableCredential) context.Context
- type CredentialProvider
- type EmployeeDetails
- type OAuth2TokenSource
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNutsNodeUnreachable = errors.New("nuts node unreachable")
Functions ¶
func ParseResponse ¶ added in v0.1.3
func UnwrapAPIError ¶ added in v0.1.3
func WithAdditionalCredentials ¶
func WithAdditionalCredentials(ctx context.Context, credentials []vc.VerifiableCredential) context.Context
WithAdditionalCredentials returns a new context with the additional credentials set. They will be provided to the Nuts node when requesting the service access token.
Types ¶
type CredentialProvider ¶
type CredentialProvider interface {
Credentials() []vc.VerifiableCredential
}
type EmployeeDetails ¶
func (EmployeeDetails) Credentials ¶
func (e EmployeeDetails) Credentials() []vc.VerifiableCredential
type OAuth2TokenSource ¶
type OAuth2TokenSource struct { NutsSubject string // NutsAPIURL is the base URL of the Nuts node API. NutsAPIURL string // NutsHttpClient is the HTTP client used to communicate with the Nuts node. // If not set, http.DefaultClient is used. NutsHttpClient *http.Client }
func TokenSource ¶
func TokenSource(nutsAPIURL string, ownDID string) *OAuth2TokenSource
TokenSource returns an oauth2.TokenSource that authenticates to the OAuth2 remote Resource Server with Nuts OAuth2 access tokens. It only supports service access tokens (client credentials flow, no OpenID4VP) at the moment. It will use the API of a local Nuts node to request the access token.
Directories ¶
Path | Synopsis |
---|---|
Package common provides primitives to interact with the openapi HTTP API.
|
Package common provides primitives to interact with the openapi HTTP API. |
Package discovery provides primitives to interact with the openapi HTTP API.
|
Package discovery provides primitives to interact with the openapi HTTP API. |
Package iam provides primitives to interact with the openapi HTTP API.
|
Package iam provides primitives to interact with the openapi HTTP API. |
Package vcr provides primitives to interact with the openapi HTTP API.
|
Package vcr provides primitives to interact with the openapi HTTP API. |
Package vdr provides primitives to interact with the openapi HTTP API.
|
Package vdr provides primitives to interact with the openapi HTTP API. |
Click to show internal directories.
Click to hide internal directories.