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
|
, azurePrimaryKey, azureUserPrincipalName, azureUserDisplayName, azureUserGivenName, azureUserSurname, azureUserMail, azureUserTelephone, azureUserMobile, azureUserPreferredLanguage
|
||||||
, azureUser, azureUser'
|
, azureUser, azureUser'
|
||||||
, AzureUserException(..), _AzureUserError, _AzureUserNoResult, _AzureUserAmbiguous
|
, AzureUserException(..), _AzureUserError, _AzureUserNoResult, _AzureUserAmbiguous
|
||||||
|
, apAzureMock
|
||||||
, oauth2MockServer
|
, oauth2MockServer
|
||||||
, mockPluginName
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import qualified Data.CaseInsensitive as CI
|
import qualified Data.CaseInsensitive as CI
|
||||||
@ -79,8 +79,8 @@ azureUser' conf User{userIdent}
|
|||||||
---- OAuth2 development auth plugin ----
|
---- OAuth2 development auth plugin ----
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
|
|
||||||
mockPluginName :: Text
|
apAzureMock :: Text
|
||||||
mockPluginName = "uniworx_dev"
|
apAzureMock = "uniworx_dev"
|
||||||
|
|
||||||
newtype UserID = UserID Text
|
newtype UserID = UserID Text
|
||||||
instance FromJSON UserID where
|
instance FromJSON UserID where
|
||||||
@ -98,10 +98,10 @@ oauth2MockServer =
|
|||||||
}
|
}
|
||||||
mockServerURL = "0.0.0.0/"
|
mockServerURL = "0.0.0.0/"
|
||||||
profileSrc = fromString $ mockServerURL <> "/foo"
|
profileSrc = fromString $ mockServerURL <> "/foo"
|
||||||
in authOAuth2 mockPluginName oa $ \manager token -> do
|
in authOAuth2 apAzureMock oa $ \manager token -> do
|
||||||
(UserID userID, userResponse) <- authGetProfile mockPluginName manager token profileSrc
|
(UserID userID, userResponse) <- authGetProfile apAzureMock manager token profileSrc
|
||||||
return Creds
|
return Creds
|
||||||
{ credsPlugin = mockPluginName
|
{ credsPlugin = apAzureMock
|
||||||
, credsIdent = userID
|
, credsIdent = userID
|
||||||
, credsExtra = setExtra token userResponse
|
, credsExtra = setExtra token userResponse
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user