Add missing methods in UserInternalAPITrace

This commit is contained in:
Piotr Kozimor 2021-08-11 06:02:58 +02:00
parent 840e54c6d2
commit c7f8e6d3bb

View file

@ -116,6 +116,32 @@ func (t *UserInternalAPITrace) QueryOpenIDToken(ctx context.Context, req *QueryO
return err return err
} }
func (t *UserInternalAPITrace) CreateSession(ctx context.Context, req *CreateSessionRequest, res *CreateSessionResponse) error {
err := t.Impl.CreateSession(ctx, req, res)
util.GetLogger(ctx).Infof("CreateSession req=%+v res=%+v", js(req), js(res))
return err
}
func (t *UserInternalAPITrace) ValidateSession(ctx context.Context, req *ValidateSessionRequest, res struct{}) error {
err := t.Impl.ValidateSession(ctx, req, res)
util.GetLogger(ctx).Infof("ValidateSession req=%+v res=%+v", js(req), js(res))
return err
}
func (t *UserInternalAPITrace) GetThreePidForSession(ctx context.Context, req *SessionOwnership, res *GetThreePidForSessionResponse) error {
err := t.Impl.GetThreePidForSession(ctx, req, res)
util.GetLogger(ctx).Infof("GetThreePidForSession req=%+v res=%+v", js(req), js(res))
return err
}
func (t *UserInternalAPITrace) DeleteSession(ctx context.Context, req *SessionOwnership, res struct{}) error {
err := t.Impl.DeleteSession(ctx, req, res)
util.GetLogger(ctx).Infof("DeleteSession req=%+v res=%+v", js(req), js(res))
return err
}
func (t *UserInternalAPITrace) IsSessionValidated(ctx context.Context, req *SessionOwnership, res *IsSessionValidatedResponse) error {
err := t.Impl.IsSessionValidated(ctx, req, res)
util.GetLogger(ctx).Infof("IsSessionValidated req=%+v res=%+v", js(req), js(res))
return err
}
func js(thing interface{}) string { func js(thing interface{}) string {
b, err := json.Marshal(thing) b, err := json.Marshal(thing)
if err != nil { if err != nil {