-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marco Zocca
committed
Aug 11, 2023
1 parent
d620c3b
commit 9774e2b
Showing
18 changed files
with
369 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import Distribution.Simple | ||
main = defaultMain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{-# LANGUAGE DataKinds #-} | ||
{-# language OverloadedStrings #-} | ||
{-# language QuasiQuotes #-} | ||
module Main (main) where | ||
|
||
import Control.Monad.IO.Class (MonadIO(..)) | ||
-- hoauth2 | ||
import Network.OAuth.OAuth2 (OAuth2Token(..)) | ||
import Network.OAuth2.Experiment (IdpApplication, GrantTypeFlow(..)) | ||
-- unliftio | ||
import UnliftIO (MonadUnliftIO(..)) | ||
import UnliftIO.Exception (throwIO) | ||
import UnliftIO.STM (STM, TVar, atomically, newTVarIO, readTVar, writeTVar, modifyTVar) | ||
-- uri-bytestring | ||
import URI.ByteString.QQ (uri) | ||
|
||
import Network.OAuth2.Provider.AzureAD (azureBotFrameworkADApp, AzureBotFramework) | ||
import MSAuth (Token, tokenUpdateLoop, readToken, UserSub, Scotty, Action) | ||
import MSAzureAPI (tryReq) | ||
|
||
main :: IO () | ||
main = pure () | ||
|
||
|
||
-- also double check https://stackoverflow.com/a/63929994/2890063 in the AAD app manifest | ||
idpApp :: MonadIO m => m (IdpApplication 'ClientCredentials AzureBotFramework) | ||
idpApp = azureBotFrameworkADApp "ms-azure-bot-framework-api-test" | ||
|
Oops, something went wrong.