diff options
Diffstat (limited to 'bin/ui')
| -rwxr-xr-x | bin/ui | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -9,6 +9,7 @@ gemfile do gem "erb", "~> 4.0" gem "net-hippie", "~> 1.0" gem "rack", "~> 3.0" + gem "rack-session", "~> 2.0" gem "rackup", "~> 2.0" gem "saml-kit", "~> 1.0" gem "webrick", "~> 1.0" @@ -137,6 +138,7 @@ class UI saml_response = saml_binding.deserialize(request.params) raise saml_response.errors unless saml_response.valid? + request.session[:access_token] = saml_response.attributes[:access_token] template = <<~ERB <!doctype html> <html> @@ -157,6 +159,8 @@ if __FILE__ == $0 app = Rack::Builder.new do use Rack::CommonLogger use Rack::Reloader + use Rack::Session::Cookie, { domain: $host.split(":", 2)[0], path: "/", secret: SecureRandom.hex(64) } + run UI.new end.to_app |
