pass v0.3.0 Pass.Authenticate

Implements methods for adding and validating session state for a connection.

Summary

Functions

Sets up and returns a connection with the session data of a user in the data store that matches the provided credentials. If no such match exists, it clears out the session

Clears out the session data. Used when logging out

Extend valid sessions, or clear out invalid ones

Returns true if the session is still valid, otherwise false

Functions

credentials(conn, identity, password)

Sets up and returns a connection with the session data of a user in the data store that matches the provided credentials. If no such match exists, it clears out the session.

delete_session(conn)

Clears out the session data. Used when logging out.

session(conn)

Extend valid sessions, or clear out invalid ones.

session_valid?(conn)

Returns true if the session is still valid, otherwise false.