Documentation ¶
Index ¶
- Constants
- Variables
- func ErrFn(logFn LoggerFn) optionFn
- func LogFn(logFn LoggerFn) optionFn
- func NewLogger(opt ...optionFn) (*logger, error)
- func NewServer(store osin.Storage, l log.Logger) (*osin.Server, error)
- type Account
- type LoggerFn
- type OptionFn
- type ReadStore
- type Server
- func (s *Server) Authorize(w http.ResponseWriter, r *http.Request)
- func (s *Server) LoadActorFromAuthHeader(r *http.Request) (vocab.Actor, error)
- func (s *Server) Redirect(w http.ResponseWriter, r *http.Request, url string, status int)
- func (s Server) Routes(r chi.Router) chi.Routes
- func (s *Server) Token(w http.ResponseWriter, r *http.Request)
- func (s *Server) ValidateLoggedIn() func(next http.Handler) http.Handler
Constants ¶
View Source
const ID = osin.AuthorizeRequestType("id")
ID is the type of authorization that IndieAuth is using
Variables ¶
View Source
var AnonymousActor = vocab.Actor{ ID: vocab.PublicNS, Type: vocab.ActorType, Name: vocab.NaturalLanguageValues{ vocab.LangRefValue{ Ref: vocab.NilLangRef, Value: vocab.Content("Anonymous"), }, }, }
View Source
var EmptyLogFn = func(log.Ctx, string, ...interface{}) {}
Functions ¶
Types ¶
type ReadStore ¶
type ReadStore interface { // Load returns an Item or an ItemCollection from an IRI Load(vocab.IRI, ...filters.Check) (vocab.Item, error) }
ReadStore
type Server ¶
func (*Server) LoadActorFromAuthHeader ¶
LoadActorFromAuthHeader reads the Authorization header of an HTTP request and tries to decode it either an OAuth2 or HTTP Signatures:
* For OAuth2 it tries to load the matching local actor and use it further in the processing logic. * For HTTP Signatures it tries to load the federated actor and use it further in the processing logic.
Click to show internal directories.
Click to hide internal directories.