diff --git a/src/Application.hs b/src/Application.hs index cac5ce2c1..5a513c825 100644 --- a/src/Application.hs +++ b/src/Application.hs @@ -356,7 +356,7 @@ makeFoundation appSettings''@AppSettings{..} = do return . uncurry p $ fromJust mArgs appAuthPlugins <- liftIO $ sequence [ - return oauth2MockServer + return azureMockServer , loadPlugin (oauth2AzureADv2 tenantID) "AZURE_ADV2" ] diff --git a/src/Auth/OAuth2.hs b/src/Auth/OAuth2.hs index 2d340baa3..3bec397b0 100644 --- a/src/Auth/OAuth2.hs +++ b/src/Auth/OAuth2.hs @@ -10,7 +10,7 @@ module Auth.OAuth2 , azureUser, azureUser' , AzureUserException(..), _AzureUserError, _AzureUserNoResult, _AzureUserAmbiguous , apAzureMock - , oauth2MockServer + , azureMockServer ) where import qualified Data.CaseInsensitive as CI @@ -87,8 +87,8 @@ instance FromJSON UserID where parseJSON = withObject "UserID" $ \o -> UserID <$> o .: "id" -oauth2MockServer :: YesodAuth m => AuthPlugin m -oauth2MockServer = +azureMockServer :: YesodAuth m => AuthPlugin m +azureMockServer = let oa = OAuth2 { oauth2ClientId = "uniworx" , oauth2ClientSecret = Just "shh"