| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.Wai.Middleware.Auth.OAuth2
Synopsis
- data OAuth2 = OAuth2 {}
- oAuth2Parser :: ProviderParser
- data URIParseException = URIParseException URIParseError
- parseAbsoluteURI :: MonadThrow m => Text -> m URI
- getAccessToken :: Request -> Maybe OAuth2Token
Documentation
General OAuth2 authentication Provider.
Constructors
| OAuth2 | |
Fields
| |
Instances
| ToJSON OAuth2 Source # | |
Defined in Network.Wai.Middleware.Auth.OAuth2 | |
| FromJSON OAuth2 Source # | |
| AuthProvider OAuth2 Source # | |
Defined in Network.Wai.Middleware.Auth.OAuth2 Methods getProviderName :: OAuth2 -> Text Source # getProviderInfo :: OAuth2 -> ProviderInfo Source # handleLogin :: OAuth2 -> Request -> [Text] -> Render ProviderUrl -> (AuthLoginState -> IO Response) -> (Status -> ByteString -> IO Response) -> IO Response Source # refreshLoginState :: OAuth2 -> Request -> AuthUser -> IO (Maybe (Request, AuthUser)) Source # | |
oAuth2Parser :: ProviderParser Source #
Aeson parser for OAuth2 provider.
Since: 0.1.0
data URIParseException Source #
Used for validating proper url structure. Can be thrown by
parseAbsoluteURI and consequently by handleLogin for OAuth2 Provider
instance.
Since: 0.1.2.0
Constructors
| URIParseException URIParseError |
Instances
| Show URIParseException Source # | |
Defined in Network.Wai.Middleware.Auth.OAuth2 Methods showsPrec :: Int -> URIParseException -> ShowS # show :: URIParseException -> String # showList :: [URIParseException] -> ShowS # | |
| Exception URIParseException Source # | |
Defined in Network.Wai.Middleware.Auth.OAuth2 Methods toException :: URIParseException -> SomeException # | |
parseAbsoluteURI :: MonadThrow m => Text -> m URI Source #
Parse absolute URI and throw URIParseException in case it is malformed
Since: 0.1.2.0
getAccessToken :: Request -> Maybe OAuth2Token Source #
Get the AccessToken for the current user.
If called on a Request behind the middleware, should always return a
Just value.
Since: 0.2.0.0