Documentation ¶
Index ¶
- type MemToken
- func (token *MemToken) GetAccess() string
- func (token *MemToken) GetAccessCreateAt() time.Time
- func (token *MemToken) GetAccessExpireIn() int64
- func (token *MemToken) GetClientId() string
- func (token *MemToken) GetCode() string
- func (token *MemToken) GetCodeCreateAt() time.Time
- func (token *MemToken) GetCodeExpireIn() int64
- func (token *MemToken) GetRefresh() string
- func (token *MemToken) GetRefreshCreateAt() time.Time
- func (token *MemToken) GetRefreshExpireIn() int64
- func (token *MemToken) GetScope() string
- func (token *MemToken) GetUserId() string
- func (token *MemToken) IsAccessExpired() bool
- func (token *MemToken) IsCodeExpired() bool
- func (token *MemToken) IsRefreshExpired() bool
- func (token *MemToken) SetAccess(access string)
- func (token *MemToken) SetAccessCreateAt(accessCreateAt time.Time)
- func (token *MemToken) SetAccessExpireIn(accessExpireIn int64)
- func (token *MemToken) SetClientId(clientId string)
- func (token *MemToken) SetCode(code string)
- func (token *MemToken) SetCodeCreateAt(codeCreateAt time.Time)
- func (token *MemToken) SetCodeExpireIn(codeExpireIn int64)
- func (token *MemToken) SetRefresh(refresh string)
- func (token *MemToken) SetRefreshCreateAt(refreshCreateAt time.Time)
- func (token *MemToken) SetRefreshExpireIn(refreshExpireIn int64)
- func (token *MemToken) SetScope(scope string)
- func (token *MemToken) SetUserId(userId string)
- type MemTokenStore
- func (s *MemTokenStore) Create(token store.Token) error
- func (s *MemTokenStore) CreateAndDel(tokenNew store.Token, tokenDel store.Token) error
- func (s *MemTokenStore) GC(gcInterval int64)
- func (s *MemTokenStore) GetByAccess(access string) (store.Token, error)
- func (s *MemTokenStore) GetByCode(code string) (store.Token, error)
- func (s *MemTokenStore) GetByRefresh(refresh string) (store.Token, error)
- func (s *MemTokenStore) Init(tokenConfig string) error
- func (s *MemTokenStore) NewToken(ctx *context.Context) store.Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemToken ¶
type MemToken struct { Id int64 ClientId string UserId string Scope string Access string AccessCreateAt time.Time AccessExpireIn int64 Refresh string RefreshCreateAt time.Time RefreshExpireIn int64 Code string CodeCreateAt time.Time CodeExpireIn int64 }
func (*MemToken) GetAccessCreateAt ¶
func (*MemToken) GetAccessExpireIn ¶
func (*MemToken) GetClientId ¶
func (*MemToken) GetCodeCreateAt ¶
func (*MemToken) GetCodeExpireIn ¶
func (*MemToken) GetRefreshCreateAt ¶
func (*MemToken) GetRefreshExpireIn ¶
func (*MemToken) IsAccessExpired ¶
func (*MemToken) IsCodeExpired ¶
func (*MemToken) IsRefreshExpired ¶
func (*MemToken) SetAccessCreateAt ¶
func (*MemToken) SetAccessExpireIn ¶
func (*MemToken) SetClientId ¶
func (*MemToken) SetCodeCreateAt ¶
func (*MemToken) SetCodeExpireIn ¶
func (*MemToken) SetRefresh ¶
func (*MemToken) SetRefreshCreateAt ¶
func (*MemToken) SetRefreshExpireIn ¶
type MemTokenStore ¶
type MemTokenStore struct {
// contains filtered or unexported fields
}
func (*MemTokenStore) CreateAndDel ¶
func (*MemTokenStore) GC ¶
func (s *MemTokenStore) GC(gcInterval int64)
func (*MemTokenStore) GetByAccess ¶
func (s *MemTokenStore) GetByAccess(access string) (store.Token, error)
func (*MemTokenStore) GetByCode ¶
func (s *MemTokenStore) GetByCode(code string) (store.Token, error)
func (*MemTokenStore) GetByRefresh ¶
func (s *MemTokenStore) GetByRefresh(refresh string) (store.Token, error)
func (*MemTokenStore) Init ¶
func (s *MemTokenStore) Init(tokenConfig string) error
Click to show internal directories.
Click to hide internal directories.