Documentation ¶
Index ¶
- Constants
- Variables
- type Controller
- func (m *Controller) CreateServiceSession(ctx *fiber.Ctx, keyID string, keySecret []byte) (*servicesession.ServiceSession, []byte, error)
- func (m *Controller) CreateSession(ctx *fiber.Ctx, device bool, provider flow.Key, userID string, ...) (*fiber.Cookie, string, error)
- func (m *Controller) DecodeMagic(encoded string) (string, []byte, error)
- func (m *Controller) EncodeMagic(email string, secret []byte) (string, error)
- func (m *Controller) GenerateCookie(session string, expiry time.Time) *fiber.Cookie
- func (m *Controller) LogoutServiceSession(ctx *fiber.Ctx) (bool, error)
- func (m *Controller) LogoutSession(ctx *fiber.Ctx) (bool, error)
- func (m *Controller) ManualValidate(ctx *fiber.Ctx) (bool, error)
- func (m *Controller) Start() error
- func (m *Controller) Stop() error
- func (m *Controller) SubscriptionHealthy() bool
- func (m *Controller) Validate(ctx *fiber.Ctx) error
Constants ¶
View Source
const ( CookieKeyString = "auth-session" AuthorizationHeaderString = "Authorization" BearerHeaderString = "Bearer " KeyDelimiterString = "." )
Variables ¶
View Source
var ( CookieKey = []byte(CookieKeyString) AuthorizationHeader = []byte(AuthorizationHeaderString) BearerHeader = []byte(BearerHeaderString) KeyDelimiter = []byte(KeyDelimiterString) EmptySecretKey = [32]byte{} )
View Source
var (
ErrInvalidContext = errors.New("invalid context")
)
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func (*Controller) CreateServiceSession ¶
func (m *Controller) CreateServiceSession(ctx *fiber.Ctx, keyID string, keySecret []byte) (*servicesession.ServiceSession, []byte, error)
func (*Controller) CreateSession ¶
func (*Controller) DecodeMagic ¶
func (m *Controller) DecodeMagic(encoded string) (string, []byte, error)
func (*Controller) EncodeMagic ¶
func (m *Controller) EncodeMagic(email string, secret []byte) (string, error)
func (*Controller) GenerateCookie ¶
func (m *Controller) GenerateCookie(session string, expiry time.Time) *fiber.Cookie
func (*Controller) LogoutServiceSession ¶
func (m *Controller) LogoutServiceSession(ctx *fiber.Ctx) (bool, error)
func (*Controller) LogoutSession ¶
func (m *Controller) LogoutSession(ctx *fiber.Ctx) (bool, error)
func (*Controller) ManualValidate ¶
func (m *Controller) ManualValidate(ctx *fiber.Ctx) (bool, error)
func (*Controller) Start ¶
func (m *Controller) Start() error
func (*Controller) Stop ¶
func (m *Controller) Stop() error
func (*Controller) SubscriptionHealthy ¶
func (m *Controller) SubscriptionHealthy() bool
func (*Controller) Validate ¶
func (m *Controller) Validate(ctx *fiber.Ctx) error
Click to show internal directories.
Click to hide internal directories.