DeviceCodeRepository
class DeviceCodeRepository implements DeviceCodeRepositoryInterface
Traits
Methods
Create a new device code entity.
Persist a device code, approval or poll timestamp.
Persist a device code, translating collisions that League can retry.
Determine whether the failed insert collided on a regenerated device identifier.
Retrieve a device code entity by its identifier.
Get the device code entity by the given user code.
Find a live device code awaiting a user's decision.
Revoke a device code.
Determine whether a device code has been revoked.
Create a new device code entity from the given device code model instance.
Details
in
PersistsTokens at line 15
protected void
saveToken(Model $token)
Save a credential or fail when a model observer cancels persistence.
at line 26
DeviceCodeEntityInterface
getNewDeviceCode()
Create a new device code entity.
{@inheritdoc}
at line 36
void
persistDeviceCode(DeviceCodeEntityInterface $deviceCodeEntity)
Persist a device code, approval or poll timestamp.
{@inheritdoc}
at line 87
protected void
persistNewDeviceCode(DeviceCode $code)
Persist a device code, translating collisions that League can retry.
at line 103
protected bool
isDeviceCodeCollision(DeviceCode $code, UniqueConstraintViolationException $exception)
Determine whether the failed insert collided on a regenerated device identifier.
at line 136
DeviceCodeEntityInterface|null
getDeviceCodeEntityByDeviceCode(string $deviceCode)
Retrieve a device code entity by its identifier.
{@inheritdoc}
at line 154
DeviceCodeEntityInterface|null
getDeviceCodeEntityByUserCode(string $userCode)
Get the device code entity by the given user code.
at line 164
DeviceCode|null
findByUserCode(string $userCode)
Find a live device code awaiting a user's decision.
at line 180
void
revokeDeviceCode(string $codeId)
Revoke a device code.
{@inheritdoc}
at line 194
bool
isDeviceCodeRevoked(string $codeId)
Determine whether a device code has been revoked.
{@inheritdoc}
at line 208
protected DeviceCodeEntityInterface
fromDeviceCodeModel(DeviceCode $model)
Create a new device code entity from the given device code model instance.