Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeError ¶
ServeError writes JSON error to response output stream.
Types ¶
type Auth ¶
type Auth interface { // IsAuthenticated checks if request is performed with all needed authorization credentials. IsAuthenticated(ctx context.Context, r *http.Request, isCookieAuth, isKeyAuth bool) (context.Context, error) // RemoveAuthCookie indicates to the client that the authentication cookie should be removed. RemoveAuthCookie(w http.ResponseWriter) }
Auth exposes methods to control authentication process for each endpoint.
Click to show internal directories.
Click to hide internal directories.