login record CRD (#2565)

* Signed-off-by: hongming <talonwan@yunify.com>

support ldap identity provider

Signed-off-by: hongming <talonwan@yunify.com>

* add login record

Signed-off-by: Jeff <zw0948@gmail.com>

Co-authored-by: hongming <talonwan@yunify.com>
This commit is contained in:
zryfish
2020-07-23 22:10:39 +08:00
committed by GitHub
parent 50a6c7b2b5
commit 3d74bb0589
51 changed files with 2163 additions and 548 deletions

View File

@@ -76,13 +76,8 @@ func (s *simpleCache) Set(key string, value string, duration time.Duration) erro
func (s *simpleCache) Del(keys ...string) error {
for _, key := range keys {
if _, ok := s.store[key]; ok {
delete(s.store, key)
} else {
return ErrNoSuchKey
}
delete(s.store, key)
}
return nil
}
@@ -99,7 +94,7 @@ func (s *simpleCache) Get(key string) (string, error) {
func (s *simpleCache) Exists(keys ...string) (bool, error) {
for _, key := range keys {
if _, ok := s.store[key]; !ok {
return false, ErrNoSuchKey
return false, nil
}
}