fix: preserve Android negotiated layer
This commit is contained in:
parent
240fc2b526
commit
2f399d5df2
10 changed files with 465 additions and 29 deletions
|
|
@ -24,6 +24,7 @@ type captureAuthService struct {
|
|||
authorizations []domain.Authorization
|
||||
authorizationLookups int
|
||||
authorizationLists int
|
||||
layerUpdates int
|
||||
loggedOutAuthKeyID [8]byte
|
||||
pendingPasswordUserID int64
|
||||
pendingPassword bool
|
||||
|
|
@ -111,6 +112,10 @@ func (s *blockingUserAuthService) Authorization(context.Context, [8]byte) (domai
|
|||
return domain.Authorization{}, false, nil
|
||||
}
|
||||
|
||||
func (s *blockingUserAuthService) UpdateAuthorizationLayer(context.Context, [8]byte, int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *blockingUserAuthService) ListAuthorizations(context.Context, int64) ([]domain.Authorization, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
|
@ -222,6 +227,17 @@ func (s *captureAuthService) Authorization(_ context.Context, authKeyID [8]byte)
|
|||
return domain.Authorization{}, false, nil
|
||||
}
|
||||
|
||||
func (s *captureAuthService) UpdateAuthorizationLayer(_ context.Context, authKeyID [8]byte, layer int) error {
|
||||
s.layerUpdates++
|
||||
for i := range s.authorizations {
|
||||
if s.authorizations[i].AuthKeyID == authKeyID {
|
||||
s.authorizations[i].Layer = layer
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *captureAuthService) ListAuthorizations(context.Context, int64) ([]domain.Authorization, error) {
|
||||
s.authorizationLists++
|
||||
return append([]domain.Authorization(nil), s.authorizations...), nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue