start test on france connect client

This commit is contained in:
Tanguy PATTE 2015-10-06 11:32:57 +02:00
parent fd60692ade
commit 5cb8f92a81
3 changed files with 25 additions and 12 deletions

View file

@ -1,20 +1,19 @@
class FranceConnectClient < OpenIDConnect::Client
def initialize params={}
@redirect_uri = 'http://localhost:3000/france_connect/callback'
@authorization_endpoint = 'https://fce.integ01.dev-franceconnect.fr/api/v1/authorize'
@token_endpoint = 'https://fce.integ01.dev-franceconnect.fr/api/v1/token'
@userinfo_endpoint = 'https://fce.integ01.dev-franceconnect.fr/api/v1/userinfo'
redirect_uri = 'http://localhost:3000/france_connect/callback'
authorization_endpoint = 'https://fce.integ01.dev-franceconnect.fr/api/v1/authorize'
token_endpoint = 'https://fce.integ01.dev-franceconnect.fr/api/v1/token'
userinfo_endpoint = 'https://fce.integ01.dev-franceconnect.fr/api/v1/userinfo'
super(
identifier: FRANCE_CONNECT.identifier,
secret: FRANCE_CONNECT.secret,
redirect_uri: @redirect_uri,
authorization_endpoint: @authorization_endpoint,
token_endpoint: @token_endpoint,
userinfo_endpoint: @userinfo_endpoint
redirect_uri: redirect_uri,
authorization_endpoint: authorization_endpoint,
token_endpoint: token_endpoint,
userinfo_endpoint: userinfo_endpoint
)
self.authorization_code = params[:code] if params.has_key? :code
end
end