🐛 Fix wrong condition on check auth context is cached
This commit is contained in:
parent
27b625e0c8
commit
cec234bc53
@ -59,7 +59,7 @@ func GetAuthContext(jti string) (models.AuthContext, error) {
|
|||||||
marshal := marshaler.New(cacheManager)
|
marshal := marshaler.New(cacheManager)
|
||||||
contx := context.Background()
|
contx := context.Background()
|
||||||
|
|
||||||
if val, err := marshal.Get(contx, GetAuthContextCacheKey(jti), new(models.AuthContext)); err != nil {
|
if val, err := marshal.Get(contx, GetAuthContextCacheKey(jti), new(models.AuthContext)); err == nil {
|
||||||
ctx = val.(models.AuthContext)
|
ctx = val.(models.AuthContext)
|
||||||
} else {
|
} else {
|
||||||
ctx, err = CacheAuthContext(jti)
|
ctx, err = CacheAuthContext(jti)
|
||||||
|
Loading…
Reference in New Issue
Block a user