Skip to content

Commit

Permalink
Merge pull request #592 from OSC/dex
Browse files Browse the repository at this point in the history
Fixes for dex support
  • Loading branch information
ericfranz authored Jul 16, 2020
2 parents acc7363 + 7d9e3ae commit 5b7db96
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion ood-portal-generator/lib/ood_portal_generator/dex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,13 @@ def client_url
"#{client_protocol}#{client_id}#{client_port}"
end

def client_redirect_uri
"#{client_url}/oidc"
end

def client_redirect_uris
config_redirect_uris = @config.fetch(:client_redirect_uris, [])
["#{client_url}/oidc"] + config_redirect_uris
[client_redirect_uri] + config_redirect_uris
end

def client_name
Expand Down
10 changes: 6 additions & 4 deletions ood-portal-generator/spec/application_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@
'SSLCertificateKeyFile /etc/pki/tls/private/example.com.key',
'SSLCertificateChainFile /etc/pki/tls/certs/example.com-interm.crt',
],
client_redirect_uris: [
'https://localhost:4443/simplesaml/module.php/authglobus/linkback.php',
'https://localhost:2443/oidc/callback/',
],
dex: {
client_redirect_uris: [
'https://localhost:4443/simplesaml/module.php/authglobus/linkback.php',
'https://localhost:2443/oidc/callback/',
],
}
})
expected_dex_yaml = read_fixture('dex.yaml.full-redirect-uris').gsub('/etc/ood/dex', config_dir)
expect(described_class.dex_output).to receive(:write).with(expected_dex_yaml)
Expand Down

0 comments on commit 5b7db96

Please sign in to comment.