Closed drsii closed 9 years ago
Possibly a Symfony 2 and Lumen official implentations? Just a thought to go along with the Laravel implentation. As said in your Sentinel campaign would be to move integrations into their own bridge packages.
Lumen, yes. Symfony, not really sure, as it's quite overwhelming to write those bundle packages heh
Assessment period is reclosed.
Assessment Phase Q3 2015
Architect: @drsii Package Lead: @suwardany Quality Control: @brunogaspar Member Advocate: Position Open
Assessment is a member driven review of package issues and proposals. We weigh the pros and cons, discuss features, and formulate a general plan for the next major.minor version. Discussion is extended for 15 days.
http://igg.me/at/sentinel-open-source
Sentinel v3 WIP
Core
(1) Premium add-ons
API
Sentinel
Registration
Sentinel::register(array $credentials, Closure $callback = null)
Status
Sentinel::check()
Sentinel::guest()
Authentication
Regular
Sentinel::authenticate($credentials, $remember = false, $login = true)
Sentinel::authenticateAndRemember($credentials)
Sentinel::stateless($credentials)
Sentinel::login(UserInterface $user, $remember = false)
Sentinel::loginAndRemember(UserInterface $user)
Sentinel::logout(UserInterface $user = null, $everywhere = false)
Basic
Sentinel::basic()
Sentinel::setRequestCredentials(Closure $requestCredentials)
Sentinel::setBasicResponse(Closure $basicResponse)
Checkpoints
Sentinel::bypassCheckpoints(Closure $callback, $checkpoints = [])
Sentinel::checkpointsStatus()
Sentinel::enableCheckpoints()
Sentinel::disableCheckpoints()
Sentinel::addCheckpoint($key, CheckpointInterface $checkpoint)
Sentinel::removeCheckpoint($key)
Setters and getters
Sentinel::getUserRepository()
Sentinel::setUserRepository(UserRepositoryInterface $users)
Sentinel::getRoleRepository()
Sentinel::setRoleRepository(RoleRepositoryInterface $roles)
Sentinel::getPersistenceRepository()
Sentinel::setPersistenceRepository(PersistenceRepositoryInterface $persistences)
Sentinel::getUserModel()
Sentinel::setUserModel($model)
Sentinel::getRoleModel()
Sentinel::setRoleModel($model)
Sentinel::getPersistenceModel()
Sentinel::setPersistenceModel($model)
Addons
Sentinel::registerAddon(AddonInterface $addon)
Sentinel::unregisterAddon(AddonInterface $addon)
Sentinel::registeredAddons()
User Repository
Sentinel::getUserRepository()->findById($id)
Sentinel::getUserRepository()->findByCredentials(array $credentials)
Sentinel::getUserRepository()->findByPersistenceCode($code)
Sentinel::getUserRepository()->recordLogin(UserInterface $user)
Sentinel::getUserRepository()->recordLogout(UserInterface $user)
Sentinel::getUserRepository()->validateCredentials(UserInterface $user, array $credentials)
Sentinel::getUserRepository()->validForCreation(array $credentials)
Sentinel::getUserRepository()->validForUpdate($user, array $credentials)
Sentinel::getUserRepository()->create(array $credentials, Closure $callback = null)
Sentinel::getUserRepository()->update($user, array $credentials)
Role Repository
Sentinel::getRoleRepository()->findById($id)
Sentinel::getRoleRepository()->findBySlug($slug)
Sentinel::getRoleRepository()->findByName($name)
Persistence Repository
Sentinel::getPersistenceRepository()->check()
Sentinel::getPersistenceRepository()->findByPersistenceCode($code)
Sentinel::getPersistenceRepository()->findUserByPersistenceCode($code)
Sentinel::getPersistenceRepository()->persist(PersistableInterface $persistable, $remember = false)
Sentinel::getPersistenceRepository()->storePersistence(PersistableInterface $persistable, $code)
Sentinel::getPersistenceRepository()->persistAndRemember(PersistableInterface $persistable)
Sentinel::getPersistenceRepository()->forget()
Sentinel::getPersistenceRepository()->remove($code)
Sentinel::getPersistenceRepository()->removePersistences($persistable)
Sentinel::getPersistenceRepository()->flush(PersistableInterface $persistable, $forget = true)
Implementations
Discussion
Detailed functionalities
Add-ons
Creating an add-on
Add-ons must implement
Cartalyst\Sentinel\Addons\AddonInterface
Registering an addon
Addons can be registered by instantiating the addon class and passing it to the
registerAddon
method.Using an addon
Calling the addon identifier on Sentinel returns the addon class.