Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Jun 7, 2024
1 parent 65e27c7 commit e52f1fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ gem "vite_rails", "3.0.12"
gem "whenever"

# Reference: https://github.com/pulibrary/pul-the-hard-way/blob/main/services/cas.md
gem "devise"
gem "devise", "~> 4.9"
gem "omniauth", "~> 2.1", ">= 2.1.2"
gem "omniauth-cas", "~> 3.0"

# Use Active Storage variant
Expand Down
13 changes: 7 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ GEM
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
bcrypt (3.1.17)
bcrypt (3.1.20)
bcrypt_pbkdf (1.1.0)
bindex (0.8.1)
bixby (4.0.0)
Expand Down Expand Up @@ -180,7 +180,7 @@ GEM
debase-ruby_core_source (3.2.0)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devise (4.8.1)
devise (4.9.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
Expand Down Expand Up @@ -378,9 +378,9 @@ GEM
redis-client (0.22.1)
connection_pool
regexp_parser (2.8.1)
responders (3.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
retryable (3.0.5)
rexml (3.2.8)
strscan (>= 3.0.9)
Expand Down Expand Up @@ -570,7 +570,7 @@ DEPENDENCIES
datacite!
datacite-mapping
ddtrace
devise
devise (~> 4.9)
dogstatsd-ruby
ed25519
equivalent-xml (~> 0.6.0)
Expand All @@ -593,6 +593,7 @@ DEPENDENCIES
net-smtp
net-ssh (= 7.0.0.beta1)
nokogiri (>= 1.13.4)
omniauth (~> 2.1, >= 2.1.2)
omniauth-cas (~> 3.0)
pg
pry-byebug
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@

## For CAS
config.omniauth :cas, host: "fed.princeton.edu", url: "https://fed.princeton.edu/cas"
OmniAuth.config.allowed_request_methods = [:get, :post]
OmniAuth.config.request_validation_phase = OmniAuth::AuthenticityTokenProtection.new(allow_if: ->(_env) { true })

# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
Expand Down

0 comments on commit e52f1fe

Please sign in to comment.