Documentation
¶
Index ¶
Constants ¶
View Source
const ContextKey = "user"
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(provider Provider) mux.MiddlewareFunc
Types ¶
type Provider ¶
Provider tries to authenticate using the provided auth token
func NewIAPIProvider ¶
NewIAPIProvider authenticates a user by hitting internal-api with the auth token and matching the response to a local user. If auth is successful, the user will have a lbrynet server assigned and a wallet that's created and ready to use.
type Result ¶
type Result struct {
SDKAddress string
// contains filtered or unexported fields
}
wish i could make this non-exported, but then you can't create new providers outside the package don't make this struct directly. instead use NewResult
func FromRequest ¶
func (Result) AuthAttempted ¶
func (Result) Authenticated ¶
Click to show internal directories.
Click to hide internal directories.