Class AssistedChannelsUsersController
java.lang.Object
es.kukenan.smartfi.microservice.clients.controller.assistenchannels.AssistedChannelsUsersController
Rest service exposed for Assisted Channels users endpoints.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringAGENT/SUPERVISOR API access authorities.static final StringREST API onboarding processes resources base path.static final StringREST API assisted login endpoint path.static final StringREST API base path (assisted channels API).static final StringREST API user generate OTP assisted-channel.static final StringREST API user reset password.static final StringREST API onboarding processes resources base path.private es.kukenan.smartfi.common.context.RequestContextManagerRequest context manager.private UserServiceUsers service. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.clients.dto.AssistedChannelLoginResponseDto>assistedChannelLogin(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl authenticationJwt) Post to login an Assited Channel agent.es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.clients.dto.UserDto>findUsers(String name, String surname, String documentNumber, Integer pageNumber, Integer pageSize, String sortedBy, es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Find users based on the given search criteria.org.springframework.http.ResponseEntity<Void>generateOtp(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl authentication) Generate OTP and create firm.org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.clients.dto.LoginResponseDto>impersonateUser(es.kukenan.smartfi.microservice.clients.dto.ImpersonateRequestDto userId, es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl authentication) Impersonate the user with a given identifier.org.springframework.http.ResponseEntity<Void>resetUserPassword(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl authentication) Reset and send new provisional password.org.springframework.http.ResponseEntity<Void>unlockUser(String userId) Unlock user.
-
Field Details
-
API_AGENT_AUTHORITIES
AGENT/SUPERVISOR API access authorities.- See Also:
-
API_PATH
REST API base path (assisted channels API).- See Also:
-
API_LOGIN_PATH
REST API assisted login endpoint path.- See Also:
-
API_IMPERSONATION_PATH
REST API onboarding processes resources base path.- See Also:
-
API_USERS_PATH
REST API onboarding processes resources base path.- See Also:
-
API_USER_RESET_PASSWORD
REST API user reset password.- See Also:
-
API_USER_GENERATE_OTP
REST API user generate OTP assisted-channel.- See Also:
-
userService
Users service. -
contextManager
@Autowired private es.kukenan.smartfi.common.context.RequestContextManager contextManagerRequest context manager.
-
-
Constructor Details
-
AssistedChannelsUsersController
public AssistedChannelsUsersController()
-
-
Method Details
-
assistedChannelLogin
@PostMapping(value="/api/v1/assisted-channels/login", consumes="application/json") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.clients.dto.AssistedChannelLoginResponseDto> assistedChannelLogin(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl authenticationJwt) Post to login an Assited Channel agent.- Parameters:
authenticationJwt- Authentication generated by user "LDAP" information data- Returns:
- Authentication in Base64
-
findUsers
@GetMapping(path="/api/v1/assisted-channels/users", produces="application/json") @PreAuthorize("hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')") public es.kukenan.smartfi.common.api.dtos.ResultsPageDto<es.kukenan.smartfi.microservice.clients.dto.UserDto> findUsers(@RequestParam(name="name",required=false) String name, @RequestParam(name="surname",required=false) String surname, @RequestParam(name="documentNumber",required=false) String documentNumber, @RequestParam(name="pageNumber",required=false) Integer pageNumber, @RequestParam(name="pageSize",required=false) Integer pageSize, @RequestParam(name="sortedBy",required=false) String sortedBy, @RequestParam(name="companyId") es.kukenan.smartfi.common.service.jwt.enums.EntityBankEnum companyId, es.kukenan.smartfi.common.security.WalletAuthentication authentication) Find users based on the given search criteria.- All search criteria parameters are optional.
- All text criteria are use to search as case insensitive substring in the given field.
- Parameters:
name- user name.surname- user surname.documentNumber- user identification document number.pageNumber- results page number. Optional, default 0.pageSize- results page size. Optional, with configured default value and configured absolute maximum.sortedBy- allows the client to specify the field name to sort, default in ascending order. Add ASC or DESC keyword to specify sorting direction.companyId- Identifier company.authentication- authorized credentials. Used to extract additional query criteria, like the user company.- Returns:
- the users found wrapped in a page DTO.
-
unlockUser
@PatchMapping(path="/api/v1/assisted-channels/users/{userId}/unlock", produces="application/json", consumes="application/json") @PreAuthorize("hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')") public org.springframework.http.ResponseEntity<Void> unlockUser(@PathVariable("userId") String userId) Unlock user.- Parameters:
userId- User identifier- Returns:
- a
ResponseEntityempty.
-
impersonateUser
@PostMapping(path="/api/v1/assisted-channels/impersonations", produces="application/json", consumes="application/json") @PreAuthorize("hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.clients.dto.LoginResponseDto> impersonateUser(@RequestBody es.kukenan.smartfi.microservice.clients.dto.ImpersonateRequestDto userId, es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl authentication) Impersonate the user with a given identifier.- Parameters:
userId- the user identifier.authentication- authorized credentials. Used to extract additional query criteria, like the user company.- Returns:
- new credentials if the impersonation was successful.
-
resetUserPassword
@PatchMapping(path="/api/v1/assisted-channels/users/resetPassword", produces="application/json") @PreAuthorize("hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')") public org.springframework.http.ResponseEntity<Void> resetUserPassword(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl authentication) Reset and send new provisional password.- Parameters:
authentication- authorized credentials. Used to extract additional query criteria, like the user company.- Returns:
- a
ResponseEntityempty.
-
generateOtp
@PostMapping(path="/api/v1/assisted-channels/users/generateOtp", produces="application/json") @PreAuthorize("hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')") public org.springframework.http.ResponseEntity<Void> generateOtp(es.kukenan.smartfi.common.service.jwt.WalletAuthenticationJwtImpl authentication) Generate OTP and create firm.- Parameters:
authentication- authorized credentials. Used to extract additional query criteria, like the user company.- Returns:
- a
ResponseEntityempty.
-