fix: preserve Android negotiated layer
This commit is contained in:
parent
240fc2b526
commit
2f399d5df2
10 changed files with 465 additions and 29 deletions
|
|
@ -158,6 +158,20 @@ func (s *AuthorizationStore) ByAuthKey(_ context.Context, id [8]byte) (domain.Au
|
|||
return a, ok, nil
|
||||
}
|
||||
|
||||
func (s *AuthorizationStore) UpdateLayer(_ context.Context, id [8]byte, layer int) error {
|
||||
if layer <= 0 {
|
||||
return nil
|
||||
}
|
||||
s.mu.Lock()
|
||||
if a, ok := s.m[id]; ok {
|
||||
a.Layer = layer
|
||||
a.ActiveAt = time.Now()
|
||||
s.m[id] = a
|
||||
}
|
||||
s.mu.Unlock()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *AuthorizationStore) MarkPasswordPassed(_ context.Context, id [8]byte) error {
|
||||
s.mu.Lock()
|
||||
if a, ok := s.m[id]; ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue