diff --git a/src/Auth/OAuth2.hs b/src/Auth/OAuth2.hs index f30f4d7c1..2d340baa3 100644 --- a/src/Auth/OAuth2.hs +++ b/src/Auth/OAuth2.hs @@ -9,8 +9,8 @@ module Auth.OAuth2 , azurePrimaryKey, azureUserPrincipalName, azureUserDisplayName, azureUserGivenName, azureUserSurname, azureUserMail, azureUserTelephone, azureUserMobile, azureUserPreferredLanguage , azureUser, azureUser' , AzureUserException(..), _AzureUserError, _AzureUserNoResult, _AzureUserAmbiguous + , apAzureMock , oauth2MockServer - , mockPluginName ) where import qualified Data.CaseInsensitive as CI @@ -79,8 +79,8 @@ azureUser' conf User{userIdent} ---- OAuth2 development auth plugin ---- ---------------------------------------- -mockPluginName :: Text -mockPluginName = "uniworx_dev" +apAzureMock :: Text +apAzureMock = "uniworx_dev" newtype UserID = UserID Text instance FromJSON UserID where @@ -98,10 +98,10 @@ oauth2MockServer = } mockServerURL = "0.0.0.0/" profileSrc = fromString $ mockServerURL <> "/foo" - in authOAuth2 mockPluginName oa $ \manager token -> do - (UserID userID, userResponse) <- authGetProfile mockPluginName manager token profileSrc + in authOAuth2 apAzureMock oa $ \manager token -> do + (UserID userID, userResponse) <- authGetProfile apAzureMock manager token profileSrc return Creds - { credsPlugin = mockPluginName + { credsPlugin = apAzureMock , credsIdent = userID , credsExtra = setExtra token userResponse }