Documentation
¶
Overview ¶
Package webfinger
Index ¶
- Constants
- Variables
- func FilterID(id string) filters.Check
- func FilterName(name string) filters.Check
- func FilterURL(u string) filters.Check
- func IconOf(it vocab.Item) string
- func LoadActor(dbs []Storage, checkFns ...filters.Check) (vocab.Item, error)
- func LoadIRI(dbs []Storage, what vocab.IRI, checkFns ...filters.Check) (vocab.Item, error)
- func New(l lw.Logger, db ...Storage) handler
- func NodeInfoConfig(app vocab.Actor, ni WebInfo) nodeinfo.Config
- type NodeInfoResolver
- type OAuthAuthorizationMetadata
- type Storage
- type Store
- type WebInfo
Constants ¶
View Source
const NodeInfoDiscoverPath = "/.well-known/nodeinfo"
View Source
const NodeInfoPath = "/nodeinfo"
View Source
const WellKnownHostPath = "/.well-known/host-meta"
View Source
const WellKnownOAuthAuthorizationServerPath = "/.well-known/oauth-authorization-server"
View Source
const WellKnownWebFingerPath = "/.well-known/webfinger"
Variables ¶
View Source
var ( ValidActorTypes = vocab.ActivityVocabularyTypes{ vocab.PersonType, vocab.ServiceType, vocab.GroupType, vocab.ApplicationType, vocab.OrganizationType, } ValidContentTypes = vocab.ActivityVocabularyTypes{ vocab.ArticleType, vocab.NoteType, vocab.LinkType, vocab.PageType, vocab.DocumentType, vocab.VideoType, vocab.AudioType, } )
View Source
var Version = "HEAD"
Functions ¶
func FilterName ¶
Types ¶
type NodeInfoResolver ¶
type NodeInfoResolver struct {
// contains filtered or unexported fields
}
func NodeInfoResolverNew ¶
func NodeInfoResolverNew(r storage.ReadStore, app vocab.Actor) NodeInfoResolver
func (NodeInfoResolver) IsOpenRegistration ¶
func (n NodeInfoResolver) IsOpenRegistration() (bool, error)
type OAuthAuthorizationMetadata ¶
type OAuthAuthorizationMetadata struct {
Issuer string `json:"issuer"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
TokenEndpoint string `json:"token_endpoint"`
TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported,omitempty"`
TokenEndpointAuthSigningAlgValuesSupported []string `json:"token_endpoint_auth_signing_alg_values_supported,omitempty"`
RegistrationEndpoint string `json:"registration_endpoint"`
GrantTypesSupported []osin.AccessRequestType `json:"grant_types_supported,omitempty"`
ScopesSupported []string `json:"scopes_supported,omitempty"`
ResponseTypesSupported []string `json:"response_types_supported,omitempty"`
ClientIDMetadataDocumentSupported bool `json:"client_id_metadata_document_supported"`
ServiceDocumentation string `json:"service_documentation,omitempty"`
CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported,omitempty"`
}
OAuthAuthorizationMetadata is the metadata returned by RFC8414 well known oauth-authorization-server end-point
https://datatracker.ietf.org/doc/html/rfc8414#section-3.2
Additionally we have added the "client_id_metadata_document_supported" field from the OAuth2 Client ID Metadata Document to let OAuth2 clients know that the mechanism is indeed supported.
type WebInfo ¶
type WebInfo struct {
Title string `json:"title"`
Email string `json:"email"`
Summary string `json:"summary"`
Description string `json:"description"`
Thumbnail string `json:"thumbnail,omitempty"`
Languages []string `json:"languages"`
URI string `json:"uri"`
Urls []string `json:"urls,omitempty"`
Version string `json:"version"`
}
Click to show internal directories.
Click to hide internal directories.