Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de99a26
commit 4a2b302
Showing
5 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
Header Authorize creates alterations of the Login System to accept Header information for authorization. This allows you to use a central authentication system for multiple applications. | ||
|
||
An @authenticate_with_header@ method is added as a before_filter on the ApplicationController. @authenticate_with_header@ will look for a header named @user_email@ and will allow or disallow based on a user in Radiant having the given email address. | ||
An `authenticate_with_header` method is added as a before_filter on the ApplicationController. `authenticate_with_header` will look for a header named `user_email` and will allow or disallow based on a user in Radiant having the given email address. | ||
|
||
This requires that you manage your user accounts so that all active users have valid email addresses listed in the Radiant database. | ||
|
||
If you would like to change the Header used to authorize users from a rake task you may run | ||
|
||
rake radiant:extensions:header_authorize:set HEADER='AUTHORIZED_USER' | ||
|
||
Built by Saturn Flyer http://www.saturnflyer.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace :radiant do | ||
namespace :extensions do | ||
namespace :header_authorize do | ||
|
||
desc "Sets the 'authorization.header' in Radiant::Config to the string passed in with HEADER='AUTHORIZED_USER'" | ||
task :set => :environment do | ||
if ENV['HEADER'].nil? | ||
puts "You must provide a HEADER, such as HEADER='AUTHORIZED_USER'" | ||
else | ||
Radiant::Config[HEADER_AUTHORIZE_KEY] = "#{ENV['HEADER']}" | ||
end | ||
end | ||
|
||
end | ||
end | ||
end |