[MM-50219] OAuth 2.0 (#22310)
* tools updates * Revert "tools updates" This reverts commit 6293297b55803c5a263e200ebd80192899666ae9. * oauth fix * rename migration * migrations-extract * translations * unit test * lint --------- Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local> Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.ht.home> Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MBP.fritz.box> Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.fritz.box>
Этот коммит содержится в:
@@ -5036,6 +5036,22 @@ func (s *TimerLayerOAuthStore) RemoveAuthData(code string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerOAuthStore) RemoveAuthDataByClientId(clientId string, userId string) error {
|
||||
start := time.Now()
|
||||
|
||||
err := s.OAuthStore.RemoveAuthDataByClientId(clientId, userId)
|
||||
|
||||
elapsed := float64(time.Since(start)) / float64(time.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if err == nil {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("OAuthStore.RemoveAuthDataByClientId", success, elapsed)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *TimerLayerOAuthStore) SaveAccessData(accessData *model.AccessData) (*model.AccessData, error) {
|
||||
start := time.Now()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user