chore(auth): oauth2MockServer->azureMockServer
This commit is contained in:
parent
a85a5be4cd
commit
ac045fdc70
@ -356,7 +356,7 @@ makeFoundation appSettings''@AppSettings{..} = do
|
|||||||
return . uncurry p $ fromJust mArgs
|
return . uncurry p $ fromJust mArgs
|
||||||
|
|
||||||
appAuthPlugins <- liftIO $ sequence [
|
appAuthPlugins <- liftIO $ sequence [
|
||||||
return oauth2MockServer
|
return azureMockServer
|
||||||
, loadPlugin (oauth2AzureADv2 tenantID) "AZURE_ADV2"
|
, loadPlugin (oauth2AzureADv2 tenantID) "AZURE_ADV2"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ module Auth.OAuth2
|
|||||||
, azureUser, azureUser'
|
, azureUser, azureUser'
|
||||||
, AzureUserException(..), _AzureUserError, _AzureUserNoResult, _AzureUserAmbiguous
|
, AzureUserException(..), _AzureUserError, _AzureUserNoResult, _AzureUserAmbiguous
|
||||||
, apAzureMock
|
, apAzureMock
|
||||||
, oauth2MockServer
|
, azureMockServer
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import qualified Data.CaseInsensitive as CI
|
import qualified Data.CaseInsensitive as CI
|
||||||
@ -87,8 +87,8 @@ instance FromJSON UserID where
|
|||||||
parseJSON = withObject "UserID" $ \o ->
|
parseJSON = withObject "UserID" $ \o ->
|
||||||
UserID <$> o .: "id"
|
UserID <$> o .: "id"
|
||||||
|
|
||||||
oauth2MockServer :: YesodAuth m => AuthPlugin m
|
azureMockServer :: YesodAuth m => AuthPlugin m
|
||||||
oauth2MockServer =
|
azureMockServer =
|
||||||
let oa = OAuth2
|
let oa = OAuth2
|
||||||
{ oauth2ClientId = "uniworx"
|
{ oauth2ClientId = "uniworx"
|
||||||
, oauth2ClientSecret = Just "shh"
|
, oauth2ClientSecret = Just "shh"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user