Class: FactPulse::Helpers::AFNORCredentials
- Inherits:
-
Object
- Object
- FactPulse::Helpers::AFNORCredentials
- Defined in:
- lib/factpulse/helpers/client.rb
Overview
Credentials AFNOR PDP pour le mode Zero-Trust. L’API FactPulse utilise ces credentials pour s’authentifier auprès de la PDP AFNOR.
Instance Attribute Summary collapse
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#directory_service_url ⇒ Object
readonly
Returns the value of attribute directory_service_url.
-
#flow_service_url ⇒ Object
readonly
Returns the value of attribute flow_service_url.
-
#token_url ⇒ Object
readonly
Returns the value of attribute token_url.
Instance Method Summary collapse
-
#initialize(flow_service_url:, token_url:, client_id:, client_secret:, directory_service_url: nil) ⇒ AFNORCredentials
constructor
A new instance of AFNORCredentials.
- #to_h ⇒ Object
Constructor Details
#initialize(flow_service_url:, token_url:, client_id:, client_secret:, directory_service_url: nil) ⇒ AFNORCredentials
Returns a new instance of AFNORCredentials.
24 25 26 27 |
# File 'lib/factpulse/helpers/client.rb', line 24 def initialize(flow_service_url:, token_url:, client_id:, client_secret:, directory_service_url: nil) @flow_service_url, @token_url = flow_service_url, token_url @client_id, @client_secret, @directory_service_url = client_id, client_secret, directory_service_url end |
Instance Attribute Details
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
23 24 25 |
# File 'lib/factpulse/helpers/client.rb', line 23 def client_id @client_id end |
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
23 24 25 |
# File 'lib/factpulse/helpers/client.rb', line 23 def client_secret @client_secret end |
#directory_service_url ⇒ Object (readonly)
Returns the value of attribute directory_service_url.
23 24 25 |
# File 'lib/factpulse/helpers/client.rb', line 23 def directory_service_url @directory_service_url end |
#flow_service_url ⇒ Object (readonly)
Returns the value of attribute flow_service_url.
23 24 25 |
# File 'lib/factpulse/helpers/client.rb', line 23 def flow_service_url @flow_service_url end |
#token_url ⇒ Object (readonly)
Returns the value of attribute token_url.
23 24 25 |
# File 'lib/factpulse/helpers/client.rb', line 23 def token_url @token_url end |
Instance Method Details
#to_h ⇒ Object
28 29 30 31 32 33 |
# File 'lib/factpulse/helpers/client.rb', line 28 def to_h result = { 'flow_service_url' => @flow_service_url, 'token_url' => @token_url, 'client_id' => @client_id, 'client_secret' => @client_secret } result['directory_service_url'] = @directory_service_url if @directory_service_url result end |