Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaimMatchResult ¶
type ClaimMatchResult struct {
ServiceProvider ServiceProvider `json:"serviceProvider"`
Claim Claim `json:"claim"`
// MatchArray []string
ClaimProfile ClaimProfile `json:"claimProfile"`
}
ClaimMatchResult is the result of matching a claim, it contains the service provider, the claim, and the claim profile.
type ClaimProfile ¶
type ClaimProfile struct {
UserId string `json:"userId"`
Host string `json:"host"`
ProfileLink string `json:"profileLink"`
ProofLink string `json:"proofLink"`
}
ClaimProfile is the profile of a claim, it contains the user id, the profile link and the proof link(if I can generate it without web).
type ClaimResult ¶
type ClaimResult struct {
ClaimMatchResult ClaimMatchResult `json:"claimMatchResult"`
ClaimVerify ClaimVerify `json:"claimVerify"`
}
ClaimResult is the result of a claim, it contains the claim match result and the claim verify result.
type ClaimVerify ¶
type ClaimVerify struct {
Verified bool `json:"verified"`
ProxyDescription string `json:"proxyDescription"`
}
ClaimVerify is the result of verifying a claim, it contains whether the claim is verified and the proxy description(if used proxy).
type Proxys ¶
Proxys is a map of service provider ids to proxy values,about what type each proxy is, please see the documentation about the specific service provider.
type ServiceProvider ¶
type ServiceProvider struct {
Id string `json:"id"`
// Host mo.Option[string] `json:"host"`
NeedProxy bool `json:"needProxy"`
// Prefix []string
MatchHandler func(Claim) bool `json:"-"`
MakeClaimProfileFunc func(Claim) ClaimProfile `json:"-"`
FetchFunc func(ClaimProfile, Proxy) mo.Result[string] `json:"-"`
}
A ServiceProvider is a service provider, it contains the id, the display name,the host, whether it needs a proxy, the prefix of the claims it can verify, a function that fetches the proofString, and a function that makes a ClaimProfile from a Claim.