class ApiController extends AbstractController

Api Controller class

Properties

private ApiServiceInterface $apiService Stores ApiServiceInterface
private ConfigServiceInterface $configService Stores ConfigServiceInterface
private EventDispatcherInterface $dispatcher Stores EventDispatcherInterface
private UserServiceInterface $userService Stores UserServiceInterface

Methods

__construct(ApiServiceInterface $apiService, ConfigServiceInterface $configService, EventDispatcherInterface $dispatcher, UserServiceInterface $userService)

No description

JsonResponse
listAll(Request $request, PaginatorInterface $paginator)

Lists all the users

JsonResponse
search(Request $request, PaginatorInterface $paginator, string $term)

Searches for %{term}% in email

JsonResponse
create(Request $request, ValidatorInterface $validator)

Creates the user using the API

JsonResponse
authenticate(Request $request)

Authenticates the user using the API and returns the JWToken

JsonResponse
display($identifier)

Returns the json for a specific user using "/user/api/display/{identifier}"

JsonResponse
modify(Request $request, $identifier)

Modifies specific user using "/user/api/modify/{identifier}"

JsonResponse
delete(Request $request, $identifier)

Deletes specific user using "/user/api/delete/{identifier}"

JsonResponse
addRole($identifier, $role)

Adds role to specific user using "/user/api/add-role/{identifier}/{role}"

JsonResponse
deleteRole($identifier, $role)

Adds role to specific user using "/user/api/delete-role/{identifier}/{role}"

JsonResponse
modifyRoles(Request $request, $identifier)

Modifies roles to specific user using "/user/api/modify-role/{identifier}"

JsonResponse
changePassword(Request $request)

Allows to change password for specific user using "/user/api/change-password"

JsonResponse
resetPassword(Request $request)

Allows to reset password for specific user using "/user/api/reset-password"

JsonResponse
resetPasswordConfirm(Request $request, $token)

Confirm the reset of the password for specific user using "/user/api/reset-password-confirm"

JsonResponse
export(Request $request)

Export the user's data in JSON

Details

at line 58
__construct(ApiServiceInterface $apiService, ConfigServiceInterface $configService, EventDispatcherInterface $dispatcher, UserServiceInterface $userService)

Parameters

ApiServiceInterface $apiService
ConfigServiceInterface $configService
EventDispatcherInterface $dispatcher
UserServiceInterface $userService

at line 81
JsonResponse listAll(Request $request, PaginatorInterface $paginator)

Lists all the users

Parameters

Request $request
PaginatorInterface $paginator

Return Value

JsonResponse

Exceptions

AccessDeniedException

Searches for %{term}% in email

Parameters

Request $request
PaginatorInterface $paginator
string $term

Return Value

JsonResponse

Exceptions

AccessDeniedException

at line 138
JsonResponse create(Request $request, ValidatorInterface $validator)

Creates the user using the API

Parameters

Request $request
ValidatorInterface $validator

Return Value

JsonResponse

Exceptions

AccessDeniedException

at line 178
JsonResponse authenticate(Request $request)

Authenticates the user using the API and returns the JWToken

Parameters

Request $request

Return Value

JsonResponse

Exceptions

AccessDeniedException

at line 211
JsonResponse display($identifier)

Returns the json for a specific user using "/user/api/display/{identifier}"

Parameters

$identifier

Return Value

JsonResponse

Exceptions

AccessDeniedException
NotFoundHttpException

at line 235
JsonResponse modify(Request $request, $identifier)

Modifies specific user using "/user/api/modify/{identifier}"

Parameters

Request $request
$identifier

Return Value

JsonResponse

Exceptions

AccessDeniedException
NotFoundHttpException

at line 268
JsonResponse delete(Request $request, $identifier)

Deletes specific user using "/user/api/delete/{identifier}"

Parameters

Request $request
$identifier

Return Value

JsonResponse

Exceptions

AccessDeniedException
NotFoundHttpException

at line 303
JsonResponse addRole($identifier, $role)

Adds role to specific user using "/user/api/add-role/{identifier}/{role}"

Parameters

$identifier
$role

Return Value

JsonResponse

Exceptions

AccessDeniedException
NotFoundHttpException

at line 332
JsonResponse deleteRole($identifier, $role)

Adds role to specific user using "/user/api/delete-role/{identifier}/{role}"

Parameters

$identifier
$role

Return Value

JsonResponse

Exceptions

AccessDeniedException
NotFoundHttpException

at line 358
JsonResponse modifyRoles(Request $request, $identifier)

Modifies roles to specific user using "/user/api/modify-role/{identifier}"

Parameters

Request $request
$identifier

Return Value

JsonResponse

Exceptions

AccessDeniedException
NotFoundHttpException

at line 382
JsonResponse changePassword(Request $request)

Allows to change password for specific user using "/user/api/change-password"

Parameters

Request $request

Return Value

JsonResponse

Exceptions

AccessDeniedException

at line 401
JsonResponse resetPassword(Request $request)

Allows to reset password for specific user using "/user/api/reset-password"

Parameters

Request $request

Return Value

JsonResponse

Exceptions

AccessDeniedException
NotFoundHttpException

at line 427
JsonResponse resetPasswordConfirm(Request $request, $token)

Confirm the reset of the password for specific user using "/user/api/reset-password-confirm"

Parameters

Request $request
$token

Return Value

JsonResponse

Exceptions

AccessDeniedException
NotFoundHttpException

at line 449
JsonResponse export(Request $request)

Export the user's data in JSON

Parameters

Request $request

Return Value

JsonResponse

Exceptions

AccessDeniedException