core.lcp package¶
Submodules¶
core.lcp.credential module¶
- class core.lcp.credential.LCPCredentialFactory[source]¶
Bases:
object
Generates patron’s credentials used by the LCP License Server
- get_hashed_passphrase(db, patron)[source]¶
Returns an existing hashed passphrase
- Parameters:
db (sqlalchemy.orm.session.Session) – Database session
patron (core.model.patron.Patron) – Patron object
- Returns:
Existing hashed passphrase
- Return type:
string
- get_patron_id(db, patron)[source]¶
Generates a new or returns an existing patron’s ID associated with an LCP license
- Parameters:
db (sqlalchemy.orm.session.Session) – Database session
patron (core.model.patron.Patron) – Patron object
- Returns:
Newly generated or existing patron’s ID associated with an LCP license
- Return type:
string
- get_patron_passphrase(db, patron)[source]¶
Generates a new or returns an existing patron’s passphrase associated with an LCP license
- Parameters:
db (sqlalchemy.orm.session.Session) – Database session
patron (core.model.patron.Patron) – Patron object
- Returns:
Newly generated or existing patron’s passphrase associated with an LCP license
- Return type:
string
- set_hashed_passphrase(db, patron, hashed_passphrase)[source]¶
Stores the hashed passphrase as a persistent token
- Parameters:
db (sqlalchemy.orm.session.Session) – Database session
patron (core.model.patron.Patron) – Patron object
hashed_passphrase (string) – Existing hashed passphrase
- class core.lcp.credential.LCPCredentialType(value)[source]¶
Bases:
Enum
Contains an enumeration of different LCP credential types
- LCP_HASHED_PASSPHRASE = 'Hashed LCP Passphrase passed to the LCP License Server'¶
- LCP_PASSPHRASE = 'LCP Passphrase passed to the LCP License Server'¶
- PATRON_ID = 'Patron ID passed to the LCP License Server'¶