ssomg 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a63ab61cb909c5033977d9bb959ee2dbc49ee82d
4
- data.tar.gz: '09a6599e0c2b37fd432dde7bb07f8990f20f6db7'
3
+ metadata.gz: 5c73a7366e9f5dae3c70fb5a95ba525d41850eea
4
+ data.tar.gz: a631f6c89afe712bd099ad99dc89bb5ad6d50601
5
5
  SHA512:
6
- metadata.gz: 205c2b2d7759f388281fbd823d881fcbe568996310ead2d0e4ca868fbd6bca4d24363770bb279aeb42202d4c6dd5b0d9a95cb9f83f33191867dd64b69e09e0cd
7
- data.tar.gz: 7517549388c01a754f982b57f1038c635fe2d51437c745d1d4c1993987d38fd6984480d88dbdb30b4201c7c5f18c898f49bdf4785adc82345daa591e9eeba4db
6
+ metadata.gz: c98f9eb4cd0229a0d4ea1fc1f7bbd2a5ce5313d8a6b84c4b127210a0f5c1b8599876477c723004ed649f7e1ce8375f4b0278174a97fae2f334d557b6ae27d1a0
7
+ data.tar.gz: 9162d3248aa9b11aa94aa39a63f998920b234049627dd21be81a8b0febada5e14fcb5c3d4bf2d15b2e5463fd8731e028140b817e494e7ed13452fec77b72c983
data/README.md CHANGED
@@ -92,7 +92,7 @@ If a user JWT is set, @user will be set like this:
92
92
  ### Environment ###
93
93
 
94
94
  When you register the app and the users in the main SSOMG admin, you'll be issued with an app id and the public key used to verify tokens.
95
- You'll need to add the public key to your project, and then add the following attributes to your environment file to make sure it works correctly:
95
+ You'll need to add the public key to your project, and then add the following attributes to your environment variables to ensure it works correctly:
96
96
 
97
97
  ```
98
98
  PUB_KEY_PATH=./keys/sso
@@ -100,6 +100,32 @@ APP_ID=xxxxxxxxxxxxxxxxxxxxxxxx
100
100
  SSO_HOST=https://auth.mysite.com
101
101
  ```
102
102
 
103
+ You can set these with docker, or here's a boilerplate:
104
+ `/config/application.rb`
105
+ ```
106
+ module RoarAuthTesterRails
107
+ class Application < Rails::Application
108
+ .
109
+ .
110
+ .
111
+
112
+ env_file = File.join(Rails.root, 'config', 'local_env.yml')
113
+ YAML.load(File.open(env_file)).each do |key, value|
114
+ ENV[key.to_s] = value
115
+ end if File.exists?(env_file)
116
+
117
+ Ssomg.configure
118
+ end
119
+ end
120
+ ```
121
+
122
+ `/config/local_env.rb`
123
+ ```
124
+ APP_ID: xxxxxxxxxxxxxxxxxxxxxx
125
+ PUB_KEY_PATH: ./config/public_key
126
+ SSO_HOST: http://auth.myhost.com
127
+ ```
128
+
103
129
  In production, the app will automatically use secure and http-only cookies.
104
130
 
105
131
  ## Gotchas
data/lib/ssomg/engine.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  module Ssomg
2
- puts "TEst"
3
2
  @@PUB_KEY = ""
4
3
  class Engine < Rails::Engine
5
4
 
@@ -9,9 +8,6 @@ module Ssomg
9
8
  end
10
9
 
11
10
  def self.configure
12
- puts "TEst 2"
13
- puts ENV["PUB_KEY_PATH"]
14
- puts File.read( ENV["PUB_KEY_PATH"] )
15
11
  @@PUB_KEY = OpenSSL::PKey::RSA.new( File.read( ENV["PUB_KEY_PATH"] ) )
16
12
  end
17
13
 
data/lib/ssomg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ssomg
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssomg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henry McIntosh