58c5d44f44
This change integrates the session management database functionality with the web application. Claim-based authentication has been removed in favor of session token-based authentication. Change-Id: I62a4f5354a3ed8ca80272814aad2448f901eab1b
18 lines
569 B
Go
18 lines
569 B
Go
// Copyright (C) 2022 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package api
|
|
|
|
import (
|
|
"context"
|
|
"net/http"
|
|
)
|
|
|
|
// Auth exposes methods to control authentication process for each endpoint.
|
|
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)
|
|
}
|