README.md in ruby_isds-0.12.0 vs README.md in ruby_isds-0.13.0

- old
+ new

@@ -20,21 +20,37 @@ $ gem install ruby_isds ## Usage -Before usage please add config (for rails initializer) with following: +Before usage please add config (for rails initializer) with one of supported +auth strategies: +### Username + password + ```ruby RubyIsds.configure do |c| c.data_box = 'data_box_id' c.username = 'somebody' c.password = 'data_box_password' c.env = :development end ``` +### Server side system certificate +```ruby +RubyIsds.configure do |c| + c.data_box = 'data_box_id' + c.cert_file = 'spec/factories/files/certifikat.pem' + c.key_file = 'spec/factories/files/test-key.key' + c.pass_phrase = 'andrej' + c.env = :development +end +``` +here `data_box_id` if id of databox you will be accessing, you do not really +need id of databox used as point from where you access + you do not have to provide `env` in setup unless you go to production, gem defaults to `:development` anyway... This gem provides you with 2 basic classes and those are: - `RubyIsds::DataBox` (operations and manipulation around data box itself) @@ -217,9 +233,22 @@ #### #received? ### Help If in doubt, or my so called 'README' seems not that helpful, please refer to [ISDS provozni rad](https://www.datoveschranky.info/dulezite-informace/provozni-rad-isds) + +#### Certificates + +Just some helpfull information when you want to use certificate to access +databoxes: + +How to setup and what not in ISDS: [https://www.czebox.cz/static/ISDS/help/page8.html#8_4](https://www.czebox.cz/static/ISDS/help/page8.html#8_4) + +Working with DER/PEM and what not around the keys: [https://knowledge.digicert.com/solution/SO26449.html](https://knowledge.digicert.com/solution/SO26449.html) + +How to convert windows pfx file exported from keychain into key you need here: [https://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/](https://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/) + +Jus to note here, certificate accepted should be in PEM format and you have to add the private.key with the password to it. ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.