ApiService
class ApiService implements ApiServiceInterface
Main services related to API
Constants
DELAY |
Used to define the delay (2 hours) to allow password reset |
Properties
private ConfigServiceInterface | $configService | Stores ConfigServiceInterface | |
private EntityManagerInterface | $em | Stores EntityManagerInterface | |
private Keychain | $keychain | Stores Keychain | |
private UserPasswordEncoderInterface | $passwordEncoder | Stores UserPasswordEncoderInterface | |
private RouterInterface | $router | Stores RouterInterface | |
private Sha512 | $signer | Stores Sha512 | |
private UserServiceInterface | $userService | Stores UserServiceInterface |
Methods
No description
Allows user to change its password by submitting a new one
Creates the user using the API
Deletes the user
Returns the list of all users in the array format
Searches the term in the User collection
Encodes the JSON Web Token
Hydrates the user with given parameters
Modifies the user
Allows user to reset its password by setting a token to call the reset confirm Route
Reset and change the user password
Validates the JWToken
Details
at line 83
__construct(ConfigServiceInterface $configService, EntityManagerInterface $em, RouterInterface $router, UserPasswordEncoderInterface $passwordEncoder, UserServiceInterface $userService)
at line 103
changePassword($user, $parameters)
Allows user to change its password by submitting a new one
at line 125
create($user, ParameterBag $parameters)
Creates the user using the API
at line 148
delete($user)
Deletes the user
at line 162
array
findAll()
Returns the list of all users in the array format
at line 174
array
findAllSearch(string $term)
Searches the term in the User collection
at line 185
string
getToken($user, Request $request)
Encodes the JSON Web Token
at line 212
hydrate($user, $parameters)
Hydrates the user with given parameters
at line 225
modify($user, $parameters)
Modifies the user
at line 236
resetPassword($user)
Allows user to reset its password by setting a token to call the reset confirm Route
at line 269
resetPasswordConfirm($user, $parameters)
Reset and change the user password
at line 299
array|null
validateToken(string $token)
Validates the JWToken