Commit 87a44aba authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg

Update fetch links with openid and regular userinfo endpoint

parent 206bbc6b
......@@ -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({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment