Documentation ¶
Index ¶
- Constants
- Variables
- func AuthFromMD(ctx context.Context, expectedScheme string) (string, error)
- func BypassAuthCaches(ctx context.Context) bool
- func Get(cfg *config.Config) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
- func GetJWTValidators(config *config.Config) []*validator.Validator
- func HTTPAuthMiddleware(config *config.Config) func(http.Handler) http.Handler
- func HTTPMetadataExtractorMiddleware(_ *config.Config) func(http.Handler) http.Handler
- type CustomClaim
- type Forwarder
- type Namespace
- type TigrisClaims
- type TokenCtxkey
- type User
Constants ¶
View Source
const (
CookieMaxAgeKey = "Expires"
)
Variables ¶
View Source
var ( OutgoingHeaders = metadata.New(map[string]string{}) OutgoingStreamHeaders = metadata.New(map[string]string{}) )
View Source
var ( DefaultTimeout = 10 * time.Second MaximumTimeout = 30 * time.Second LongRunningTimeout = 1 * time.Hour )
View Source
var ( BypassAuthForTheseMethods = container.NewHashSet( api.HealthMethodName, api.GetAccessTokenMethodName, ) )
View Source
var (
ClusterAdminRoleName = "cluster_admin"
)
View Source
var UserAgent = "tigris-forwarder/" + util.Version
Functions ¶
func BypassAuthCaches ¶
func Get ¶
func Get(cfg *config.Config) (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor)
func HTTPAuthMiddleware ¶
Types ¶
type CustomClaim ¶
type CustomClaim struct { Namespace Namespace `json:"https://tigris/n"` User User `json:"https://tigris/u"` TigrisClaims TigrisClaims `json:"https://tigris"` }
type TigrisClaims ¶
type TokenCtxkey ¶
type TokenCtxkey struct{}
Click to show internal directories.
Click to hide internal directories.