Skip to content

Commit

Permalink
MSAuth file
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Zocca committed Jul 1, 2023
1 parent 256b1a1 commit ce63e16
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions ms-auth/src/MSAuth.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-- | Functions for implementing Azure AD-based authentication
--
-- Both @Auth Code Grant@ (i.e. with browser client interaction) and @App-only@ (i.e. Client Credentials) authentication flows are supported. The former is useful when a user needs to login and delegate some permissions to the application (i.e. accessing personal data), whereas the second is for server processes and automation accounts.
module MSAuth (
applyDotEnv
-- * A App-only flow (server-to-server)
, Token
, newNoToken
, expireToken
, readToken
, fetchUpdateToken
-- ** Default Azure Credential
, defaultAzureCredential
-- * B Auth code grant flow (interactive)
-- ** OAuth endpoints
, loginEndpoint
, replyEndpoint
-- ** In-memory user session
, Tokens
, newTokens
, UserSub
, lookupUser
, expireUser
, tokensToList
-- * Scotty misc
-- ** Azure App Service
, withAADUser
, Scotty
, Action
) where

import Network.OAuth2.Session
import DotEnv (applyDotEnv)

0 comments on commit ce63e16

Please sign in to comment.