keycloak-hs-3.0.2
Safe HaskellSafe-Inferred
LanguageHaskell2010

Keycloak.Types

Synopsis

Documentation

type JWT = SignedJWT Source #

Our Json Web Token as returned by Keycloak

Keycloak Monad

type Keycloak a = KeycloakT IO a Source #

Keycloak Monad stack: a simple Reader monad containing the config, and an ExceptT to handle HTTPErrors and parse errors. You can extract the value using runKeycloak. Example: keys <- runKeycloak getJWKs defaultKCConfig

newtype KeycloakT m a Source #

Constructors

KeycloakT 

Instances

Instances details
MonadTrans KeycloakT Source # 
Instance details

Defined in Keycloak.Types

Methods

lift :: Monad m => m a -> KeycloakT m a #

MonadIO m => MonadIO (KeycloakT m) Source # 
Instance details

Defined in Keycloak.Types

Methods

liftIO :: IO a -> KeycloakT m a #

Monad m => Applicative (KeycloakT m) Source # 
Instance details

Defined in Keycloak.Types

Methods

pure :: a -> KeycloakT m a #

(<*>) :: KeycloakT m (a -> b) -> KeycloakT m a -> KeycloakT m b #

liftA2 :: (a -> b -> c) -> KeycloakT m a -> KeycloakT m b -> KeycloakT m c #

(*>) :: KeycloakT m a -> KeycloakT m b -> KeycloakT m b #

(<*) :: KeycloakT m a -> KeycloakT m b -> KeycloakT m a #

Functor m => Functor (KeycloakT m) Source # 
Instance details

Defined in Keycloak.Types

Methods

fmap :: (a -> b) -> KeycloakT m a -> KeycloakT m b #

(<$) :: a -> KeycloakT m b -> KeycloakT m a #

Monad m => Monad (KeycloakT m) Source # 
Instance details

Defined in Keycloak.Types

Methods

(>>=) :: KeycloakT m a -> (a -> KeycloakT m b) -> KeycloakT m b #

(>>) :: KeycloakT m a -> KeycloakT m b -> KeycloakT m b #

return :: a -> KeycloakT m a #

MonadTime m => MonadTime (KeycloakT m) Source # 
Instance details

Defined in Keycloak.Types

data KCError Source #

Contains HTTP errors and parse errors.

Constructors

HTTPError HttpException

Keycloak returned an HTTP error.

ParseError Text

Failed when parsing the response

JWTError JWTError

Failed to decode the token

EmptyError

Empty error to serve as a zero element for Monoid.

data KCConfig Source #

Constructors

KCConfig 

Instances

Instances details
Generic KCConfig Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep KCConfig :: Type -> Type #

Methods

from :: KCConfig -> Rep KCConfig x #

to :: Rep KCConfig x -> KCConfig #

Show KCConfig Source # 
Instance details

Defined in Keycloak.Types

Eq KCConfig Source # 
Instance details

Defined in Keycloak.Types

type Rep KCConfig Source # 
Instance details

Defined in Keycloak.Types

type Rep KCConfig = D1 ('MetaData "KCConfig" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'False) (C1 ('MetaCons "KCConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "_confAdapterConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AdapterConfig) :*: S1 ('MetaSel ('Just "_confJWKs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [JWK])))

data AdapterConfig Source #

Configuration of Keycloak.

Constructors

AdapterConfig 

Fields

Instances

Instances details
FromJSON AdapterConfig Source # 
Instance details

Defined in Keycloak.Types

ToJSON AdapterConfig Source # 
Instance details

Defined in Keycloak.Types

Generic AdapterConfig Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep AdapterConfig :: Type -> Type #

Show AdapterConfig Source # 
Instance details

Defined in Keycloak.Types

Eq AdapterConfig Source # 
Instance details

Defined in Keycloak.Types

type Rep AdapterConfig Source # 
Instance details

Defined in Keycloak.Types

type Rep AdapterConfig = D1 ('MetaData "AdapterConfig" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'False) (C1 ('MetaCons "AdapterConfig" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_confRealm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Realm) :*: S1 ('MetaSel ('Just "_confAuthServerUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ServerURL)) :*: (S1 ('MetaSel ('Just "_confResource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClientId) :*: S1 ('MetaSel ('Just "_confCredentials") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ClientCredentials))))

data ClientCredentials Source #

Constructors

ClientCredentials 

Fields

Instances

Instances details
FromJSON ClientCredentials Source # 
Instance details

Defined in Keycloak.Types

ToJSON ClientCredentials Source # 
Instance details

Defined in Keycloak.Types

Generic ClientCredentials Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep ClientCredentials :: Type -> Type #

Show ClientCredentials Source # 
Instance details

Defined in Keycloak.Types

Eq ClientCredentials Source # 
Instance details

Defined in Keycloak.Types

type Rep ClientCredentials Source # 
Instance details

Defined in Keycloak.Types

type Rep ClientCredentials = D1 ('MetaData "ClientCredentials" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'False) (C1 ('MetaCons "ClientCredentials" 'PrefixI 'True) (S1 ('MetaSel ('Just "_confSecret") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

defaultAdapterConfig :: AdapterConfig Source #

Default configuration

runKeycloak :: Monad m => KeycloakT m a -> KCConfig -> m (Either KCError a) Source #

Run a Keycloak monad within IO.

type Path = Text Source #

Token

data TokenRep Source #

Token reply from Keycloak

Instances

Instances details
FromJSON TokenRep Source # 
Instance details

Defined in Keycloak.Types

Show TokenRep Source # 
Instance details

Defined in Keycloak.Types

Eq TokenRep Source # 
Instance details

Defined in Keycloak.Types

Permissions

newtype ScopeName Source #

Scope name, such as "houses:view" You need to create the scopes in ClientAuthorization panelAuthorization scopes tab

Constructors

ScopeName 

Fields

Instances

Instances details
FromJSON ScopeName Source # 
Instance details

Defined in Keycloak.Types

ToJSON ScopeName Source # 
Instance details

Defined in Keycloak.Types

Generic ScopeName Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep ScopeName :: Type -> Type #

Show ScopeName Source # 
Instance details

Defined in Keycloak.Types

Eq ScopeName Source # 
Instance details

Defined in Keycloak.Types

Ord ScopeName Source # 
Instance details

Defined in Keycloak.Types

Hashable ScopeName Source # 
Instance details

Defined in Keycloak.Types

type Rep ScopeName Source # 
Instance details

Defined in Keycloak.Types

type Rep ScopeName = D1 ('MetaData "ScopeName" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'True) (C1 ('MetaCons "ScopeName" 'PrefixI 'True) (S1 ('MetaSel ('Just "unScopeName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

newtype ScopeId Source #

Scope Id

Constructors

ScopeId 

Fields

Instances

Instances details
FromJSON ScopeId Source # 
Instance details

Defined in Keycloak.Types

ToJSON ScopeId Source # 
Instance details

Defined in Keycloak.Types

Generic ScopeId Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep ScopeId :: Type -> Type #

Methods

from :: ScopeId -> Rep ScopeId x #

to :: Rep ScopeId x -> ScopeId #

Show ScopeId Source # 
Instance details

Defined in Keycloak.Types

Eq ScopeId Source # 
Instance details

Defined in Keycloak.Types

Methods

(==) :: ScopeId -> ScopeId -> Bool #

(/=) :: ScopeId -> ScopeId -> Bool #

type Rep ScopeId Source # 
Instance details

Defined in Keycloak.Types

type Rep ScopeId = D1 ('MetaData "ScopeId" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'True) (C1 ('MetaCons "ScopeId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unScopeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Scope Source #

Keycloak scope

Constructors

Scope 

Instances

Instances details
FromJSON Scope Source # 
Instance details

Defined in Keycloak.Types

ToJSON Scope Source # 
Instance details

Defined in Keycloak.Types

Generic Scope Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep Scope :: Type -> Type #

Methods

from :: Scope -> Rep Scope x #

to :: Rep Scope x -> Scope #

Show Scope Source # 
Instance details

Defined in Keycloak.Types

Methods

showsPrec :: Int -> Scope -> ShowS #

show :: Scope -> String #

showList :: [Scope] -> ShowS #

Eq Scope Source # 
Instance details

Defined in Keycloak.Types

Methods

(==) :: Scope -> Scope -> Bool #

(/=) :: Scope -> Scope -> Bool #

type Rep Scope Source # 
Instance details

Defined in Keycloak.Types

type Rep Scope = D1 ('MetaData "Scope" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'False) (C1 ('MetaCons "Scope" 'PrefixI 'True) (S1 ('MetaSel ('Just "scopeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ScopeId)) :*: S1 ('MetaSel ('Just "scopeName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScopeName)))

data PermReq Source #

permission request You can perform a request on a specific resourse, or on all resources. You can request permission on multiple scopes at once.

Constructors

PermReq 

Fields

Instances

Instances details
Generic PermReq Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep PermReq :: Type -> Type #

Methods

from :: PermReq -> Rep PermReq x #

to :: Rep PermReq x -> PermReq #

Show PermReq Source # 
Instance details

Defined in Keycloak.Types

Eq PermReq Source # 
Instance details

Defined in Keycloak.Types

Methods

(==) :: PermReq -> PermReq -> Bool #

(/=) :: PermReq -> PermReq -> Bool #

Ord PermReq Source # 
Instance details

Defined in Keycloak.Types

Hashable PermReq Source # 
Instance details

Defined in Keycloak.Types

Methods

hashWithSalt :: Int -> PermReq -> Int #

hash :: PermReq -> Int #

type Rep PermReq Source # 
Instance details

Defined in Keycloak.Types

type Rep PermReq = D1 ('MetaData "PermReq" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'False) (C1 ('MetaCons "PermReq" 'PrefixI 'True) (S1 ('MetaSel ('Just "permReqResourceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ResourceId)) :*: S1 ('MetaSel ('Just "permReqScopes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ScopeName])))

data Permission Source #

Keycloak permission on a resource Returned by Keycloak after a permission request is made.

Constructors

Permission 

Fields

Instances

Instances details
FromJSON Permission Source # 
Instance details

Defined in Keycloak.Types

ToJSON Permission Source # 
Instance details

Defined in Keycloak.Types

Generic Permission Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep Permission :: Type -> Type #

Show Permission Source # 
Instance details

Defined in Keycloak.Types

Eq Permission Source # 
Instance details

Defined in Keycloak.Types

type Rep Permission Source # 
Instance details

Defined in Keycloak.Types

type Rep Permission = D1 ('MetaData "Permission" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'False) (C1 ('MetaCons "Permission" 'PrefixI 'True) (S1 ('MetaSel ('Just "permRsid") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ResourceId)) :*: (S1 ('MetaSel ('Just "permRsname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ResourceName)) :*: S1 ('MetaSel ('Just "permScopes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ScopeName]))))

User

type First = Int Source #

type Max = Int Source #

newtype UserId Source #

Id of a user

Constructors

UserId 

Fields

Instances

Instances details
FromJSON UserId Source # 
Instance details

Defined in Keycloak.Types

ToJSON UserId Source # 
Instance details

Defined in Keycloak.Types

Generic UserId Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep UserId :: Type -> Type #

Methods

from :: UserId -> Rep UserId x #

to :: Rep UserId x -> UserId #

Show UserId Source # 
Instance details

Defined in Keycloak.Types

Eq UserId Source # 
Instance details

Defined in Keycloak.Types

Methods

(==) :: UserId -> UserId -> Bool #

(/=) :: UserId -> UserId -> Bool #

type Rep UserId Source # 
Instance details

Defined in Keycloak.Types

type Rep UserId = D1 ('MetaData "UserId" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'True) (C1 ('MetaCons "UserId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data User Source #

User

Constructors

User 

Fields

Instances

Instances details
FromJSON User Source # 
Instance details

Defined in Keycloak.Types

ToJSON User Source # 
Instance details

Defined in Keycloak.Types

Generic User Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep User :: Type -> Type #

Methods

from :: User -> Rep User x #

to :: Rep User x -> User #

Show User Source # 
Instance details

Defined in Keycloak.Types

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

Eq User Source # 
Instance details

Defined in Keycloak.Types

Methods

(==) :: User -> User -> Bool #

(/=) :: User -> User -> Bool #

type Rep User Source # 
Instance details

Defined in Keycloak.Types

Owner

data Owner Source #

A resource owner

Constructors

Owner 

Instances

Instances details
FromJSON Owner Source # 
Instance details

Defined in Keycloak.Types

ToJSON Owner Source # 
Instance details

Defined in Keycloak.Types

Generic Owner Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep Owner :: Type -> Type #

Methods

from :: Owner -> Rep Owner x #

to :: Rep Owner x -> Owner #

Show Owner Source # 
Instance details

Defined in Keycloak.Types

Methods

showsPrec :: Int -> Owner -> ShowS #

show :: Owner -> String #

showList :: [Owner] -> ShowS #

type Rep Owner Source # 
Instance details

Defined in Keycloak.Types

type Rep Owner = D1 ('MetaData "Owner" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'False) (C1 ('MetaCons "Owner" 'PrefixI 'True) (S1 ('MetaSel ('Just "ownId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "ownName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Username))))

Resource

newtype ResourceId Source #

A resource Id

Constructors

ResourceId 

Fields

Instances

Instances details
FromJSON ResourceId Source # 
Instance details

Defined in Keycloak.Types

ToJSON ResourceId Source # 
Instance details

Defined in Keycloak.Types

Generic ResourceId Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep ResourceId :: Type -> Type #

Show ResourceId Source # 
Instance details

Defined in Keycloak.Types

Eq ResourceId Source # 
Instance details

Defined in Keycloak.Types

Ord ResourceId Source # 
Instance details

Defined in Keycloak.Types

Hashable ResourceId Source # 
Instance details

Defined in Keycloak.Types

type Rep ResourceId Source # 
Instance details

Defined in Keycloak.Types

type Rep ResourceId = D1 ('MetaData "ResourceId" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'True) (C1 ('MetaCons "ResourceId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unResId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data Resource Source #

A complete resource Resources are created in Keycloak in Client/ You can create resources in ClientAuthorization panelResources scopes tab

Constructors

Resource 

Fields

Instances

Instances details
FromJSON Resource Source # 
Instance details

Defined in Keycloak.Types

ToJSON Resource Source # 
Instance details

Defined in Keycloak.Types

Generic Resource Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep Resource :: Type -> Type #

Methods

from :: Resource -> Rep Resource x #

to :: Rep Resource x -> Resource #

Show Resource Source # 
Instance details

Defined in Keycloak.Types

type Rep Resource Source # 
Instance details

Defined in Keycloak.Types

data Attribute Source #

A resource attribute

Constructors

Attribute 

Fields

Instances

Instances details
FromJSON Attribute Source # 
Instance details

Defined in Keycloak.Types

ToJSON Attribute Source # 
Instance details

Defined in Keycloak.Types

Generic Attribute Source # 
Instance details

Defined in Keycloak.Types

Associated Types

type Rep Attribute :: Type -> Type #

Show Attribute Source # 
Instance details

Defined in Keycloak.Types

type Rep Attribute Source # 
Instance details

Defined in Keycloak.Types

type Rep Attribute = D1 ('MetaData "Attribute" "Keycloak.Types" "keycloak-hs-3.0.2-1D5hbGS3N1dGc3ClrNAkve" 'False) (C1 ('MetaCons "Attribute" 'PrefixI 'True) (S1 ('MetaSel ('Just "attName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "attValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text])))