aboutsummaryrefslogtreecommitdiff
path: root/userapi/inthttp/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'userapi/inthttp/client.go')
-rw-r--r--userapi/inthttp/client.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/userapi/inthttp/client.go b/userapi/inthttp/client.go
index 680e4cb5..1cb5ef0a 100644
--- a/userapi/inthttp/client.go
+++ b/userapi/inthttp/client.go
@@ -35,6 +35,7 @@ const (
PerformLastSeenUpdatePath = "/userapi/performLastSeenUpdate"
PerformDeviceUpdatePath = "/userapi/performDeviceUpdate"
PerformAccountDeactivationPath = "/userapi/performAccountDeactivation"
+ PerformOpenIDTokenCreationPath = "/userapi/performOpenIDTokenCreation"
QueryProfilePath = "/userapi/queryProfile"
QueryAccessTokenPath = "/userapi/queryAccessToken"
@@ -42,6 +43,7 @@ const (
QueryAccountDataPath = "/userapi/queryAccountData"
QueryDeviceInfosPath = "/userapi/queryDeviceInfos"
QuerySearchProfilesPath = "/userapi/querySearchProfiles"
+ QueryOpenIDTokenPath = "/userapi/queryOpenIDToken"
)
// NewUserAPIClient creates a UserInternalAPI implemented by talking to a HTTP POST API.
@@ -148,6 +150,14 @@ func (h *httpUserInternalAPI) PerformAccountDeactivation(ctx context.Context, re
return httputil.PostJSON(ctx, span, h.httpClient, apiURL, req, res)
}
+func (h *httpUserInternalAPI) PerformOpenIDTokenCreation(ctx context.Context, request *api.PerformOpenIDTokenCreationRequest, response *api.PerformOpenIDTokenCreationResponse) error {
+ span, ctx := opentracing.StartSpanFromContext(ctx, "PerformOpenIDTokenCreation")
+ defer span.Finish()
+
+ apiURL := h.apiURL + PerformOpenIDTokenCreationPath
+ return httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
+}
+
func (h *httpUserInternalAPI) QueryProfile(
ctx context.Context,
request *api.QueryProfileRequest,
@@ -207,3 +217,11 @@ func (h *httpUserInternalAPI) QuerySearchProfiles(ctx context.Context, req *api.
apiURL := h.apiURL + QuerySearchProfilesPath
return httputil.PostJSON(ctx, span, h.httpClient, apiURL, req, res)
}
+
+func (h *httpUserInternalAPI) QueryOpenIDToken(ctx context.Context, req *api.QueryOpenIDTokenRequest, res *api.QueryOpenIDTokenResponse) error {
+ span, ctx := opentracing.StartSpanFromContext(ctx, "QueryOpenIDToken")
+ defer span.Finish()
+
+ apiURL := h.apiURL + QueryOpenIDTokenPath
+ return httputil.PostJSON(ctx, span, h.httpClient, apiURL, req, res)
+}