From 0489d16f95a3d9f1f5bc532e2060bd2482d7b156 Mon Sep 17 00:00:00 2001 From: devonh Date: Tue, 9 May 2023 22:46:49 +0000 Subject: Move json errors over to gmsl (#3080) --- federationapi/routing/openid.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'federationapi/routing/openid.go') diff --git a/federationapi/routing/openid.go b/federationapi/routing/openid.go index cbc75a9a..d28f319f 100644 --- a/federationapi/routing/openid.go +++ b/federationapi/routing/openid.go @@ -18,8 +18,8 @@ import ( "net/http" "time" - "github.com/matrix-org/dendrite/clientapi/jsonerror" userapi "github.com/matrix-org/dendrite/userapi/api" + "github.com/matrix-org/gomatrixserverlib/spec" "github.com/matrix-org/util" ) @@ -36,7 +36,7 @@ func GetOpenIDUserInfo( if len(token) == 0 { return util.JSONResponse{ Code: http.StatusUnauthorized, - JSON: jsonerror.MissingArgument("access_token is missing"), + JSON: spec.MissingParam("access_token is missing"), } } @@ -55,7 +55,7 @@ func GetOpenIDUserInfo( nowMS := time.Now().UnixNano() / int64(time.Millisecond) if openIDTokenAttrResponse.Sub == "" || nowMS > openIDTokenAttrResponse.ExpiresAtMS { code = http.StatusUnauthorized - res = jsonerror.UnknownToken("Access Token unknown or expired") + res = spec.UnknownToken("Access Token unknown or expired") } return util.JSONResponse{ -- cgit v1.2.3