planb-token-introspection-0.1.3.0: Token Introspection for PlanB

Safe HaskellNone
LanguageHaskell2010

Network.PlanB.Introspection.Internal

Synopsis

Documentation

data TokenInfo Source #

Information returned on a successful token introspection.

Instances

data Conf m Source #

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.

Instances

Eq IntrospectionError Source # 
Show IntrospectionError Source # 
Generic IntrospectionError Source # 
Exception IntrospectionError Source # 
type Rep IntrospectionError Source # 

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.

Constructors

TokenIntrospector 

Fields

data Backend m Source #

Type for backends for the PlanB token introspector.

Constructors

Backend 

data BackendEnv m Source #

Constructors

BackendEnv 

Fields

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.

newWithBackend :: (MonadThrow m, MonadIO m) => Backend m -> Text -> m (TokenIntrospector m) Source #

Create a new PlanB token introspector using the provided backend and endpoint.

backendIO Source #

Arguments

:: MonadIO m 
=> Maybe Manager

Use global default HTTP manager if Nothing.

-> Backend m 

Produces the default IO backend.