2022-01-11 13:20:02 +00:00
|
|
|
// Copyright (C) 2022 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package api
|
|
|
|
|
2022-02-17 13:48:39 +00:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"net/http"
|
|
|
|
)
|
2022-01-11 13:20:02 +00:00
|
|
|
|
|
|
|
// Auth exposes methods to control authentication process for each endpoint.
|
|
|
|
type Auth interface {
|
2022-02-11 15:06:52 +00:00
|
|
|
// IsAuthenticated checks if request is performed with all needed authorization credentials.
|
2022-02-17 13:48:39 +00:00
|
|
|
IsAuthenticated(ctx context.Context, r *http.Request) (context.Context, error)
|
2022-01-11 13:20:02 +00:00
|
|
|
}
|