chore(auth): mockPluginName->apAzureMock
This commit is contained in:
parent
1d7b46b4a4
commit
a85a5be4cd
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user