chore(oauth2): downgrade yesod-auth-oauth2 to v0.6.3.4
This commit is contained in:
parent
cba9cadb41
commit
cea64da34d
@ -61,7 +61,7 @@ import Jobs
|
|||||||
|
|
||||||
import qualified Data.Text.Encoding as Text
|
import qualified Data.Text.Encoding as Text
|
||||||
|
|
||||||
import Yesod.Auth.OAuth2.AzureADv2 (oauth2AzureADv2Scoped)
|
import Yesod.Auth.OAuth2.AzureAD (oauth2AzureADScoped)
|
||||||
import Yesod.Auth.Util.PasswordStore
|
import Yesod.Auth.Util.PasswordStore
|
||||||
|
|
||||||
import qualified Data.ByteString.Lazy as LBS
|
import qualified Data.ByteString.Lazy as LBS
|
||||||
@ -349,7 +349,7 @@ makeFoundation appSettings''@AppSettings{..} = do
|
|||||||
#ifdef DEVELOPMENT
|
#ifdef DEVELOPMENT
|
||||||
oauth2Plugins <- liftIO $ sequence
|
oauth2Plugins <- liftIO $ sequence
|
||||||
[ (azureMockServer . fromJust) <$> lookupEnv "OAUTH2_SERVER_PORT"
|
[ (azureMockServer . fromJust) <$> lookupEnv "OAUTH2_SERVER_PORT"
|
||||||
, return $ oauth2AzureADv2Scoped ["openid", "profile", "offline_access"] "42" "42" "shhh"
|
, return $ oauth2AzureADScoped ["openid", "profile", "offline_access"] "42" "shhh"
|
||||||
]
|
]
|
||||||
#else
|
#else
|
||||||
let -- Auth Plugins
|
let -- Auth Plugins
|
||||||
@ -366,7 +366,7 @@ makeFoundation appSettings''@AppSettings{..} = do
|
|||||||
-> error "Tenant ID missing!"
|
-> error "Tenant ID missing!"
|
||||||
oauth2Plugins
|
oauth2Plugins
|
||||||
| UserAuthConfSingleSource (AuthSourceConfAzure AzureConf{..}) appUserAuthConf
|
| UserAuthConfSingleSource (AuthSourceConfAzure AzureConf{..}) appUserAuthConf
|
||||||
-> singleton $ oauth2AzureADv2Scoped (Set.toList azureConfScopes) azureConfTenantId azureConfClientId azureConfClientSecret
|
-> singleton $ oauth2AzureADScoped (Set.toList azureConfScopes) azureConfClientId azureConfClientSecret
|
||||||
| otherwise
|
| otherwise
|
||||||
-> mempty
|
-> mempty
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -118,15 +118,15 @@ instance FromJSON UserID where
|
|||||||
azureMockServer :: YesodAuth m => String -> AuthPlugin m
|
azureMockServer :: YesodAuth m => String -> AuthPlugin m
|
||||||
azureMockServer port =
|
azureMockServer port =
|
||||||
let oa = OAuth2
|
let oa = OAuth2
|
||||||
{ oauth2ClientId = "42"
|
{ oauthClientId = "42"
|
||||||
, oauth2ClientSecret = Just "shhh"
|
, oauthClientSecret = Just "shhh"
|
||||||
, oauth2AuthorizeEndpoint = fromString (mockServerURL <> "/auth")
|
, oauthOAuthorizeEndpoint = fromString (mockServerURL <> "/auth")
|
||||||
`withQuery` [ scopeParam " " ["openid", "profile", "email", "offline_access"] -- TODO read scopes from config
|
`withQuery` [ scopeParam " " ["openid", "profile", "email", "offline_access"] -- TODO read scopes from config
|
||||||
, ("response_type", "code id_token")
|
, ("response_type", "code id_token")
|
||||||
, ("nonce", "Foo") -- TODO generate meaningful value
|
, ("nonce", "Foo") -- TODO generate meaningful value
|
||||||
]
|
]
|
||||||
, oauth2TokenEndpoint = fromString $ mockServerURL <> "/token"
|
, oauthAccessTokenEndpoint = fromString $ mockServerURL <> "/token"
|
||||||
, oauth2RedirectUri = Nothing
|
, oauthCallback = Nothing
|
||||||
}
|
}
|
||||||
mockServerURL = "http://localhost:" <> fromString port
|
mockServerURL = "http://localhost:" <> fromString port
|
||||||
profileSrc = fromString $ mockServerURL <> "/users/me"
|
profileSrc = fromString $ mockServerURL <> "/users/me"
|
||||||
|
|||||||
@ -89,7 +89,7 @@ extra-deps:
|
|||||||
- yesod-websockets
|
- yesod-websockets
|
||||||
|
|
||||||
- git: https://github.com/freckle/yesod-auth-oauth2
|
- git: https://github.com/freckle/yesod-auth-oauth2
|
||||||
commit: 11948a65c405f1a99ccb327d328d416e492542a1
|
commit: 342dac80e40b10f07694a7e9aa8bab6d03ed6d66
|
||||||
|
|
||||||
- git: https://gitlab.uniworx.de/haskell/cryptonite.git
|
- git: https://gitlab.uniworx.de/haskell/cryptonite.git
|
||||||
commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f
|
commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f
|
||||||
|
|||||||
@ -416,15 +416,15 @@ packages:
|
|||||||
git: https://gitlab.uniworx.de/haskell/yesod.git
|
git: https://gitlab.uniworx.de/haskell/yesod.git
|
||||||
subdir: yesod-websockets
|
subdir: yesod-websockets
|
||||||
- completed:
|
- completed:
|
||||||
commit: 11948a65c405f1a99ccb327d328d416e492542a1
|
commit: 342dac80e40b10f07694a7e9aa8bab6d03ed6d66
|
||||||
git: https://github.com/freckle/yesod-auth-oauth2
|
git: https://github.com/freckle/yesod-auth-oauth2
|
||||||
name: yesod-auth-oauth2
|
name: yesod-auth-oauth2
|
||||||
pantry-tree:
|
pantry-tree:
|
||||||
sha256: a68ec51e1008c315dd15e81cc3ac1f4e2adfd3db623259395757ecae2787cef2
|
sha256: 22e8be5c8128e2f0fb976cb904ac93cefb49e6feef6bcadb7746641be11dcb13
|
||||||
size: 4277
|
size: 3054
|
||||||
version: 0.7.1.3
|
version: 0.6.3.4
|
||||||
original:
|
original:
|
||||||
commit: 11948a65c405f1a99ccb327d328d416e492542a1
|
commit: 342dac80e40b10f07694a7e9aa8bab6d03ed6d66
|
||||||
git: https://github.com/freckle/yesod-auth-oauth2
|
git: https://github.com/freckle/yesod-auth-oauth2
|
||||||
- completed:
|
- completed:
|
||||||
commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f
|
commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user