builtin

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSigninConsumerToken

func CheckSigninConsumerToken(signature string) (string, int64, error)

func CheckSigninConsumerTokenIssuedAt

func CheckSigninConsumerTokenIssuedAt(ctx context.Context, signature string, c *sdk.AuthConsumer) (string, error)

func NewConsumer

func NewConsumer(ctx context.Context, db gorpmapper.SqlExecutorWithTx, name, description string, duration time.Duration, parentConsumer *sdk.AuthConsumer,
	groupIDs []int64, scopes sdk.AuthConsumerScopeDetails) (*sdk.AuthConsumer, string, error)

NewConsumer returns a new builtin consumer for given data. The parent consumer should be given with all data loaded including the authentified user.

func NewDriver

func NewDriver() sdk.AuthDriver

NewDriver returns a new initialized driver for builtin authentication.

func NewSigninConsumerToken

func NewSigninConsumerToken(c *sdk.AuthConsumer) (string, error)

NewSigninConsumerToken returns a token to signin with built in consumer.

Types

type AuthDriver

type AuthDriver struct{}

AuthDriver for builtin authentication.

func (AuthDriver) CheckSigninRequest

func (d AuthDriver) CheckSigninRequest(req sdk.AuthConsumerSigninRequest) error

CheckSigninRequest checks that given driver request is valid for a signin with auth builtin.

func (AuthDriver) GetManifest

func (d AuthDriver) GetManifest() sdk.AuthDriverManifest

func (AuthDriver) GetSessionDuration

func (d AuthDriver) GetSessionDuration() time.Duration

func (AuthDriver) GetUserInfo

Jump to

Keyboard shortcuts

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