tsk-20: Obtain refresh token (#24)

Closes #20

Reviewed-on: phoenix/textsender-auth#24
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-11-21 20:49:38 +00:00
committed by phoenix
parent 0a00282ba7
commit 371dc38958
11 changed files with 640 additions and 0 deletions
+17
View File
@@ -84,3 +84,20 @@ func (m *MockServiceUserStore) GetWithUsername(ctx context.Context, username str
return nil, fmt.Errorf("User not found")
}
}
func (m *MockServiceUserStore) GetWithId(ctx context.Context, id uuid.UUID) (*user.ServiceUser, error) {
m.mu.Lock()
defer m.mu.Unlock()
if m.Error != nil {
return nil, m.Error
}
for _, serviceUser := range m.ServiceUsers {
if serviceUser.Id == id {
return serviceUser, nil
}
}
return nil, nil
}