Documentation
¶
Overview ¶
Package conformance tests a live issuer and adapter against the rules of package profile. A backend's own tests call Run. Rules a browser must drive run only when Config.SignIn is set and are skipped by name otherwise.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Issuer string
Adapter string
Bearer string
BrowserClientID string
BrowserClientSecret string
CLIClientID string
ServiceAccountClientID string
ServiceAccountClientSecret string
Resource Resource
HTTP *http.Client
BrowserRedirectURI string
SignIn SignIn
}
Config names the backend under test. The service account is a confidential client allowed the client credentials grant of RFC 6749 §4.4. HTTP must trust the issuer and the adapter. Resource must already be registered, with at least one binding so that a permission-set group exists.
type Resource ¶
Resource is a resource the backend has registered: Audience is its RFC 8707 §2 resource indicator and Scopes the RFC 6749 §3.3 scope tokens it accepts.
type SignIn ¶
SignIn drives a browser through one sign-in. It answers the URL the issuer redirected to, without following it, or an error when the issuer refused the sign-in. The device grant redirects nowhere, so its answer is ignored.
type SignInRequest ¶
type SignInRequest struct {
AuthorizationURL string
UserCode string
Invitation bool
UserName string
Password string
NewPassword string
Name *scim.Name
}
SignInRequest is one sign-in. AuthorizationURL is the page to open: an RFC 6749 §4.1.1 request or an RFC 8628 §3.3 verification URI. When Invitation is set there is no AuthorizationURL, and the hook opens the link in the latest message sent to UserName instead. An empty UserName means the caller's own test person, who holds Resource.Scopes through a permission set. Otherwise UserName and Password identify a person the suite created. UserCode, NewPassword and Name are what to submit if the issuer asks for them.