Documentation
¶
Index ¶
- type SimpleTokenManager
- func (tm *SimpleTokenManager) CreateAuthToken(ctx context.Context, subject string, perms libauth.Authz) (string, time.Time, error)
- func (tm *SimpleTokenManager) GetExpiresAt(ctx context.Context) (time.Time, error)
- func (tm *SimpleTokenManager) GetIdentity(ctx context.Context) (string, error)
- func (tm *SimpleTokenManager) GetPermissions(ctx context.Context) (libauth.Authz, error)
- func (tm *SimpleTokenManager) GetTokenString(ctx context.Context) (string, error)
- func (tm *SimpleTokenManager) GetUsername(ctx context.Context) (string, error)
- func (tm *SimpleTokenManager) Login(ctx context.Context, username, password string) (middleware.LoginResponse, error)
- func (tm *SimpleTokenManager) RefreshToken(ctx context.Context, tokenString string, withGracePeriod *time.Duration) (string, bool, time.Time, error)
- func (tm *SimpleTokenManager) SetToken(ctx context.Context, tokenString string) (context.Context, error)
- func (tm *SimpleTokenManager) ValidateAuthToken(ctx context.Context) (context.Context, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleTokenManager ¶
type SimpleTokenManager struct {
// contains filtered or unexported fields
}
func NewSimpleTokenManager ¶
func NewSimpleTokenManager(ttl time.Duration) *SimpleTokenManager
func (*SimpleTokenManager) CreateAuthToken ¶
func (*SimpleTokenManager) GetExpiresAt ¶
func (*SimpleTokenManager) GetIdentity ¶
func (tm *SimpleTokenManager) GetIdentity(ctx context.Context) (string, error)
AuthZReader methods
func (*SimpleTokenManager) GetPermissions ¶
GetPermissions returns nil because we don't manage permissions.
func (*SimpleTokenManager) GetTokenString ¶
func (tm *SimpleTokenManager) GetTokenString(ctx context.Context) (string, error)
func (*SimpleTokenManager) GetUsername ¶
func (tm *SimpleTokenManager) GetUsername(ctx context.Context) (string, error)
func (*SimpleTokenManager) Login ¶
func (tm *SimpleTokenManager) Login(ctx context.Context, username, password string) (middleware.LoginResponse, error)
func (*SimpleTokenManager) RefreshToken ¶
func (*SimpleTokenManager) ValidateAuthToken ¶
Click to show internal directories.
Click to hide internal directories.