Module

Node.Express.Passport

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

#getPassport Source

getPassport :: forall user eff. 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 user eff. Passport -> PassportInitializeOptions -> Eff (passport :: PASSPORT user | eff) PassportInitializeMiddleware

Binding for passport.initialize(options); call

#passportInitialize' Source

passportInitialize' :: forall user eff. 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 user eff. Passport -> PassportSessionOptions -> Eff (passport :: PASSPORT user | eff) PassportSessionMiddleware

Binding for passport.session(options); call

#passportSession' Source

passportSession' :: forall user eff. 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 user eff. 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 user eff. 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 info user eff. Passport -> String -> AuthenticateOptions -> Maybe (OnAuthenticate user info (passport :: PASSPORT user | eff)) -> Handler (passport :: PASSPORT user | eff)

#isAuthenticated Source

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

#OnLogin Source

type OnLogin eff = Maybe Error -> Handler eff

#logIn Source

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

#logOut Source

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

#getUser Source

getUser :: forall user eff. 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