Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data TokenInfo = TokenInfo {}
- data IntrospectionError
- data ErrorResponse = ErrorResponse {}
- data TokenIntrospector m = TokenIntrospector {
- introspectToken :: ByteString -> m TokenInfo
- new :: (MonadThrow m, MonadIO m) => Text -> m (TokenIntrospector m)
- newWithManager :: (MonadThrow m, MonadIO m) => Manager -> Text -> m (TokenIntrospector m)
- newFromEnv :: (MonadThrow m, MonadIO m) => Maybe Manager -> m (TokenIntrospector m)
Documentation
Information returned on a successful token introspection.
data IntrospectionError Source #
This type models the error scenarios specific to a token introspection attempt. These can be used as exceptions and are in fact thrown by a PlanB token introspector.
data ErrorResponse Source #
Contains the error response data returned from a PlanB server in case of an introspection error.
data TokenIntrospector m Source #
A TokenIntrospector
can be used for introspecting tokens.
TokenIntrospector | |
|
new :: (MonadThrow m, MonadIO m) => Text -> m (TokenIntrospector m) Source #
Create a new PlanB token introspector using the provided endpoint. Uses a global default HTTP manager.
newWithManager :: (MonadThrow m, MonadIO m) => Manager -> Text -> m (TokenIntrospector m) Source #
Create a new PlanB toke introspector using the provided endpoint and HTTP manager.
newFromEnv :: (MonadThrow m, MonadIO m) => Maybe Manager -> m (TokenIntrospector m) Source #
Convenience function. Create a new PlanB introspector using the
provided manager. The PlanB server to use is retrieved from the
environment variable PLANB_INTROSPECTION_ENDPOINT
.