This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Azure AD omniauth provider
To set up this up, you are required to create a new "App registration" within the Azure Active Directory service. Keep note of the Application ID, as this will be the Client ID required for the AAD_CLIENT_ID env variable. You will also be required to add the callback URL to the "reply URL" within the app registry properties, e.g. 'http://localhost:3000/auth/azureactivedirectory/callback'. Currently there is an issue with the omniauth-azure-activedirectory gem whereby we need to require the 'net/http' gem in order for the callback to be registered. See the following open issue for more details: AzureAD/omniauth-azure-activedirectory#21
- Loading branch information
Tom Sabin
committed
Jul 6, 2018
1 parent
0284c68
commit 1707209
Showing
7 changed files
with
23 additions
and
6 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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
require './lib/omniauth/strategies/azure_activedirectory.rb' | ||
|
||
OmniAuth.config.logger = Rails.logger | ||
|
||
Rails.application.config.middleware.use OmniAuth::Builder do | ||
provider :developer | ||
provider :azure_activedirectory, ENV['AAD_CLIENT_ID'], ENV['AAD_TENANT'] | ||
end |
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,5 @@ | ||
# Until "Add missing require to azure_activedirectory.rb" PR [1] is added in, we | ||
# will manually have to include net/http for the Azure AD provider to be usable | ||
# [1] https://github.com/AzureAD/omniauth-azure-activedirectory/pull/31 | ||
|
||
require 'net/http' |