code: func (s *Service) SetAuthorizationStatus(ctx context.Context, id platform.ID, status platform.Status) error {
  	op := OpPrefix + platform.OpSetAuthorizationStatus
  	a, err := s.FindAuthorizationByID(ctx, id)
  	if err != nil {
  		return &platform.Error{
  			Err: err,
  			Op:  op,
  		}
  	}
  
  	switch status {
  	case platform.Active, platform.Inactive:
  	default:
  		return &platform.Error{
  			Code: platform.EInvalid,
  			Msg:  "unknown authorization status",
  			Op:   op,
  		}
  	}
  
  	if a.Status == status {
  		return nil
  	}
  
  	a.Status = status
  	return s.PutAuthorization(ctx, a)
  }
docs: // SetAuthorizationStatus updates the status of an authorization associated with id.