Documentation
¶
Index ¶
- func CheckSigninConsumerToken(signature string) (string, int64, error)
- func CheckSigninConsumerTokenIssuedAt(ctx context.Context, signature string, c *sdk.AuthConsumer) (string, error)
- func NewConsumer(ctx context.Context, db gorpmapper.SqlExecutorWithTx, opts NewConsumerOptions, ...) (*sdk.AuthConsumer, string, error)
- func NewDriver() sdk.AuthDriver
- func NewSigninConsumerToken(c *sdk.AuthConsumer) (string, error)
- type AuthDriver
- func (d AuthDriver) CheckSigninRequest(req sdk.AuthConsumerSigninRequest) error
- func (d AuthDriver) GetManifest() sdk.AuthDriverManifest
- func (d AuthDriver) GetSessionDuration() time.Duration
- func (d AuthDriver) GetUserInfo(ctx context.Context, req sdk.AuthConsumerSigninRequest) (sdk.AuthDriverUserInfo, error)
- type NewConsumerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConsumer ¶
func NewConsumer(ctx context.Context, db gorpmapper.SqlExecutorWithTx, opts NewConsumerOptions, parentConsumer *sdk.AuthConsumer) (*sdk.AuthConsumer, string, error)
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 ¶
func (d AuthDriver) GetUserInfo(ctx context.Context, req sdk.AuthConsumerSigninRequest) (sdk.AuthDriverUserInfo, error)
type NewConsumerOptions ¶ added in v0.52.0
type NewConsumerOptions struct {
Name string
Description string
Duration time.Duration
GroupIDs []int64
Scopes sdk.AuthConsumerScopeDetails
ServiceName *string
ServiceType *string
ServiceRegion *string
ServiceIgnoreJobWithNoRegion *bool
}
NewConsumer returns a new builtin consumer for given data. The parent consumer should be given with all data loaded including the authentified user.
Click to show internal directories.
Click to hide internal directories.