middleware

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 17 Imported by: 0

README

goinfra-auth

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KeycloakPublicKey *rsa.PublicKey
View Source
var LocalSessionTokens []*LocalSessionToken

Functions

func ListenForSessionClaimed

func ListenForSessionClaimed(client authsync.AuthSyncServiceClient)

func ListenForSyncUpdates

func ListenForSyncUpdates(client authsync.AuthSyncServiceClient)

func New

func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error)

Types

type Config

type Config struct {
	KeycloakRealmURL  string
	AuthServerURL     string
	JwtSecret         []byte
	SessionCookieName string
	TokenCookieName   string
	GRPCEndpoint      string
}
var GLOBALCONFIG *Config

func CreateConfig

func CreateConfig() *Config

CreateConfig creates the default plugin configuration.

type GOInfraAuthMiddleware

type GOInfraAuthMiddleware struct {
	KeycloakPublicKey *rsa.PublicKey
	GuestPublicKey    *rsa.PublicKey
	SessionCookieName string
	AuthServerURL     string
	TokenCookieName   string
	// contains filtered or unexported fields
}

func (*GOInfraAuthMiddleware) ServeHTTP

func (j *GOInfraAuthMiddleware) ServeHTTP(rw http.ResponseWriter, req *http.Request)

type LocalSessionToken

type LocalSessionToken struct {
	SessionId string
	Token     string
}

Directories

Path Synopsis
proto module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL