From 87a44aba91c2cc66159e2e78a006ee9bc67b8395 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 10 Sep 2017 22:04:29 +0200 Subject: [PATCH] Update fetch links with openid and regular userinfo endpoint --- src/components/HTTPFetchView.jsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/HTTPFetchView.jsx b/src/components/HTTPFetchView.jsx index 50648b3..42b0e8d 100644 --- a/src/components/HTTPFetchView.jsx +++ b/src/components/HTTPFetchView.jsx @@ -56,12 +56,10 @@ class Component extends PureComponent { // console.log("PROPOS", this.props) if (this.props.serverConfig && this.props.serverConfig.authorization_endpoint && this.props.serverConfig.authorization_endpoint === 'https://auth.dataporten.no/oauth/authorization') { let links = [] - if (this.props.serverConfig.userinfo_endpoint) { - links.push({ - url: this.props.serverConfig.userinfo_endpoint, - title: "Userinfo endpoint " - }) - } + links.push({ + url: "https://auth.dataporten.no/userinfo", + title: "Basic userinfo endpoint " + }) const cntrl = /^gk_([^_]+)$/i this.props.token.scopes.forEach((scope) => { if (scope === 'groups') { @@ -70,6 +68,12 @@ class Component extends PureComponent { title: "Dataporten groups API: My groups" }) } + if (scope === 'openid' && this.props.serverConfig.userinfo_endpoint) { + links.push({ + url: this.props.serverConfig.userinfo_endpoint, + title: "OpenID Userinfo endpoint " + }) + } let res = cntrl.exec(scope) if (res) { links.push({ -- GitLab