Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype SessionVariable = SessionVariable {}
- type SessionVariableValue = Text
- sessionVariablePrefix :: Text
- isSessionVariable :: Text -> Bool
- parseSessionVariable :: Text -> Parser SessionVariable
- sessionVariableToText :: SessionVariable -> Text
- mkSessionVariable :: Text -> SessionVariable
- newtype SessionVariables = SessionVariables {}
- mkSessionVariablesText :: HashMap Text Text -> SessionVariables
- data UserAdminSecret
- data BackendOnlyFieldAccess
- data UserInfo = UserInfo {}
- class Monad m => UserInfoM m where
- askUserInfo :: m UserInfo
- data ExtraUserInfo = ExtraUserInfo {
- _euiUserId :: Maybe Text
- data UserRoleBuild
Documentation
newtype SessionVariable Source #
Instances
type SessionVariableValue = Text Source #
isSessionVariable :: Text -> Bool Source #
newtype SessionVariables Source #
Instances
data UserAdminSecret Source #
Represent the admin secret state; whether the secret is sent in the request or if actually authorization is not configured.
Instances
Show UserAdminSecret Source # | |
Defined in Hasura.RQL.Types.Session showsPrec :: Int -> UserAdminSecret -> ShowS # show :: UserAdminSecret -> String # showList :: [UserAdminSecret] -> ShowS # | |
Eq UserAdminSecret Source # | |
Defined in Hasura.RQL.Types.Session (==) :: UserAdminSecret -> UserAdminSecret -> Bool # (/=) :: UserAdminSecret -> UserAdminSecret -> Bool # |
data BackendOnlyFieldAccess Source #
Represents the 'X-Hasura-Use-Backend-Only-Permissions' session variable and request made with 'X-Hasura-Admin-Secret' if any auth configured. For more details see Note [Backend only permissions]
Instances
FromJSON BackendOnlyFieldAccess Source # | |
Defined in Hasura.RQL.Types.Session | |
ToJSON BackendOnlyFieldAccess Source # | |
Defined in Hasura.RQL.Types.Session | |
Generic BackendOnlyFieldAccess Source # | |
Defined in Hasura.RQL.Types.Session type Rep BackendOnlyFieldAccess :: Type -> Type # | |
Show BackendOnlyFieldAccess Source # | |
Defined in Hasura.RQL.Types.Session showsPrec :: Int -> BackendOnlyFieldAccess -> ShowS # show :: BackendOnlyFieldAccess -> String # showList :: [BackendOnlyFieldAccess] -> ShowS # | |
Eq BackendOnlyFieldAccess Source # | |
Defined in Hasura.RQL.Types.Session | |
Hashable BackendOnlyFieldAccess Source # | |
Defined in Hasura.RQL.Types.Session hashWithSalt :: Int -> BackendOnlyFieldAccess -> Int Source # hash :: BackendOnlyFieldAccess -> Int Source # | |
type Rep BackendOnlyFieldAccess Source # | |
Defined in Hasura.RQL.Types.Session |
Instances
FromJSON UserInfo Source # | |
ToJSON UserInfo Source # | |
Generic UserInfo Source # | |
Show UserInfo Source # | |
Eq UserInfo Source # | |
Hashable UserInfo Source # | |
type Rep UserInfo Source # | |
Defined in Hasura.RQL.Types.Session type Rep UserInfo = D1 ('MetaData "UserInfo" "Hasura.RQL.Types.Session" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "UserInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "_uiRole") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RoleName) :*: (S1 ('MetaSel ('Just "_uiSession") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SessionVariables) :*: S1 ('MetaSel ('Just "_uiBackendOnlyFieldAccess") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BackendOnlyFieldAccess)))) |
class Monad m => UserInfoM m where Source #
askUserInfo :: m UserInfo Source #
Instances
data ExtraUserInfo Source #
extra information used to identify a Hasura User
Instances
Generic ExtraUserInfo Source # | |
Defined in Hasura.RQL.Types.Session type Rep ExtraUserInfo :: Type -> Type # from :: ExtraUserInfo -> Rep ExtraUserInfo x # to :: Rep ExtraUserInfo x -> ExtraUserInfo # | |
Show ExtraUserInfo Source # | |
Defined in Hasura.RQL.Types.Session showsPrec :: Int -> ExtraUserInfo -> ShowS # show :: ExtraUserInfo -> String # showList :: [ExtraUserInfo] -> ShowS # | |
Eq ExtraUserInfo Source # | |
Defined in Hasura.RQL.Types.Session (==) :: ExtraUserInfo -> ExtraUserInfo -> Bool # (/=) :: ExtraUserInfo -> ExtraUserInfo -> Bool # | |
type Rep ExtraUserInfo Source # | |
Defined in Hasura.RQL.Types.Session type Rep ExtraUserInfo = D1 ('MetaData "ExtraUserInfo" "Hasura.RQL.Types.Session" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ExtraUserInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "_euiUserId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) |
data UserRoleBuild Source #
Represents how to build a role from the session variables
URBFromSessionVariables | Look for `x-hasura-role` session variable value and absence will raise an exception |
URBFromSessionVariablesFallback !RoleName | Look for `x-hasura-role` session variable value, if absent fall back to given role |
URBPreDetermined !RoleName | Use only the pre-determined role |
Instances
Show UserRoleBuild Source # | |
Defined in Hasura.RQL.Types.Session showsPrec :: Int -> UserRoleBuild -> ShowS # show :: UserRoleBuild -> String # showList :: [UserRoleBuild] -> ShowS # | |
Eq UserRoleBuild Source # | |
Defined in Hasura.RQL.Types.Session (==) :: UserRoleBuild -> UserRoleBuild -> Bool # (/=) :: UserRoleBuild -> UserRoleBuild -> Bool # |