Documentation
¶
Index ¶
Constants ¶
View Source
const Namespace = "github.com/pushrbx/krakend-strapi-auth"
Variables ¶
View Source
var ZeroCfg = Config{}
Functions ¶
func NewHTTPClient ¶
func NewHTTPClient(cfg *config.Backend) client.HTTPClientFactory
Types ¶
type Config ¶
func (*Config) TokenSource ¶
func (c *Config) TokenSource(ctx context.Context, t *Token) TokenSource
type LocalAuthConfig ¶
func (*LocalAuthConfig) TokenSource ¶
func (c *LocalAuthConfig) TokenSource(ctx context.Context) TokenSource
type RetrieveError ¶
type RetrieveError struct { Response *http.Response // Body is the body that was consumed by reading Response.Body. // It may be truncated. Body []byte }
func (*RetrieveError) Error ¶
func (r *RetrieveError) Error() string
type Token ¶
type Token struct { Jwt string `json:"jwt"` User internal.UserProfile `json:"user"` // contains filtered or unexported fields }
func (*Token) SetAuthHeader ¶
type TokenSource ¶
func ReuseTokenSource ¶
func ReuseTokenSource(t *Token, src TokenSource) TokenSource
type Transport ¶
type Transport struct { // Source supplies the token to add to outgoing requests' // Authorization headers. Source TokenSource // Base is the base RoundTripper used to make HTTP requests. // If nil, http.DefaultTransport is used. Base http.RoundTripper // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.