Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- 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.
TokenInfo | |
|
Instances
Show TokenInfo Source # | |
Generic TokenInfo Source # | |
ToJSON TokenInfo Source # | |
Defined in Network.PlanB.Introspection.Internal.Types | |
FromJSON TokenInfo Source # | |
type Rep TokenInfo Source # | |
Defined in Network.PlanB.Introspection.Internal.Types type Rep TokenInfo = D1 (MetaData "TokenInfo" "Network.PlanB.Introspection.Internal.Types" "planb-token-introspection-0.1.4.0-BcrjmGCfBxW3UAbM4QCMBf" False) (C1 (MetaCons "TokenInfo" PrefixI True) ((S1 (MetaSel (Just "tokenInfoExpiresIn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "tokenInfoScope") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Set Text))) :*: (S1 (MetaSel (Just "tokenInfoUid") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: S1 (MetaSel (Just "tokenInfoRealm") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))) |
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.
DeserializationFailure Text ByteString | |
InvalidRequest ErrorResponse | |
InvalidToken ErrorResponse | |
Other ErrorResponse | |
NoEndpoint |
Instances
data ErrorResponse Source #
Contains the error response data returned from a PlanB server in case of an introspection error.
Instances
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
.