Module

Node.Express.Passport

Package
purescript-express-passport
Repository
aykl/purescript-express-passport

#getPassport Source

getPassport :: forall eff user. Eff (passport :: PASSPORT user | eff) Passport

Initialize and obtain a Passport singleton instance

#PassportInitializeMiddleware Source

#PassportInitializeOptions Source

type PassportInitializeOptions = { userProperty :: String }

Type of options for passport.initialize(options); call

#passportInitializeOptions Source

passportInitializeOptions :: PassportInitializeOptions

Default options for passport.initialize(options); By default user object would be stored in the req.user property

#passportInitialize Source

passportInitialize :: forall eff user. Passport -> PassportInitializeOptions -> Eff (passport :: PASSPORT user | eff) PassportInitializeMiddleware

Binding for passport.initialize(options); call

#passportInitialize' Source

passportInitialize' :: forall eff user. Passport -> Eff (passport :: PASSPORT user | eff) PassportInitializeMiddleware

Binding for passport.initialize(options); with default options

#PassportSessionMiddleware Source

#PassportSessionOptions Source

type PassportSessionOptions = { pauseStream :: Boolean }

Type of options for passport.session(options); call

#passportSessionOptions Source

passportSessionOptions :: PassportSessionOptions

Default options for passport.session(options); call

#passportSession Source

passportSession :: forall eff user. Passport -> PassportSessionOptions -> Eff (passport :: PASSPORT user | eff) PassportSessionMiddleware

Binding for passport.session(options); call

#passportSession' Source

passportSession' :: forall eff user. Passport -> Eff (passport :: PASSPORT user | eff) PassportSessionMiddleware

Binding for `passport.session(options); with default options

#SerializeUser Source

type SerializeUser user eff = Request -> user -> Aff eff SerializedUser

#addSerializeUser Source

addSerializeUser :: forall eff user. Passport -> SerializeUser user eff -> Eff (passport :: PASSPORT user | eff) Unit

#DeserializeUser Source

type DeserializeUser user eff = Request -> Json -> Aff eff (DeserializedUser user)

#DeserializedUser Source

#addDeserializeUser Source

addDeserializeUser :: forall eff user. Passport -> DeserializeUser user eff -> Eff (passport :: PASSPORT user | eff) Unit

#OnAuthenticate Source

type OnAuthenticate user info eff = Maybe Error -> Maybe user -> Maybe info -> Maybe Number -> Handler eff

#authenticate Source

authenticate :: forall eff user info. Passport -> String -> AuthenticateOptions -> Maybe (OnAuthenticate user info (passport :: PASSPORT user | eff)) -> Handler (passport :: PASSPORT user | eff)

#isAuthenticated Source

isAuthenticated :: forall eff user. HandlerM (passport :: PASSPORT user | eff) Boolean

#OnLogin Source

type OnLogin eff = Maybe Error -> Handler eff

#logIn Source

logIn :: forall eff user. user -> LoginOptions -> Maybe (OnLogin (passport :: PASSPORT user | eff)) -> Handler (passport :: PASSPORT user | eff)

#logOut Source

logOut :: forall eff user. HandlerM (passport :: PASSPORT user | eff) Unit

#getUser Source

getUser :: forall eff user. HandlerM (passport :: PASSPORT user | eff) (Maybe user)

Re-exports from Node.Express.Passport.Common

#Passport Source

data Passport :: Type

Passport singleton instance

#PASSPORT Source

data PASSPORT :: Type -> Effect

Passport effect for specific user type