Class TokenController
java.lang.Object
io.getlime.security.powerauth.rest.api.spring.controller.TokenController
@RestController("tokenControllerV3")
@RequestMapping("/pa/v3/token")
public class TokenController
extends Object
Controller responsible for publishing services related to simple token-based authentication.
PowerAuth protocol versions:
- 3.0
- 3.1
- 3.2
- 3.3
- Author:
- Petr Dvorak, petr@wultra.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.getlime.security.powerauth.rest.api.model.response.EciesEncryptedResponsecreateToken(io.getlime.security.powerauth.rest.api.model.request.EciesEncryptedRequest request, PowerAuthApiAuthentication auth) Create token.io.getlime.core.rest.model.base.response.ObjectResponse<io.getlime.security.powerauth.rest.api.model.response.TokenRemoveResponse> removeToken(io.getlime.core.rest.model.base.request.ObjectRequest<io.getlime.security.powerauth.rest.api.model.request.TokenRemoveRequest> request, PowerAuthApiAuthentication auth) Remove token.voidsetTokenServiceV3(TokenService tokenServiceV3) Set the token verification service via setter injection.
-
Constructor Details
-
TokenController
public TokenController()
-
-
Method Details
-
setTokenServiceV3
Set the token verification service via setter injection.- Parameters:
tokenServiceV3- Token verification service.
-
createToken
@PostMapping("create") public io.getlime.security.powerauth.rest.api.model.response.EciesEncryptedResponse createToken(@RequestBody io.getlime.security.powerauth.rest.api.model.request.EciesEncryptedRequest request, PowerAuthApiAuthentication auth) throws PowerAuthAuthenticationException Create token.- Parameters:
request- ECIES encrypted create token request.auth- PowerAuth API authentication object.- Returns:
- ECIES encrypted create token response.
- Throws:
PowerAuthAuthenticationException- In case authentication fails or request is invalid.
-
removeToken
@PostMapping("remove") public io.getlime.core.rest.model.base.response.ObjectResponse<io.getlime.security.powerauth.rest.api.model.response.TokenRemoveResponse> removeToken(@RequestBody io.getlime.core.rest.model.base.request.ObjectRequest<io.getlime.security.powerauth.rest.api.model.request.TokenRemoveRequest> request, PowerAuthApiAuthentication auth) throws PowerAuthAuthenticationException Remove token.- Parameters:
request- Remove token request.auth- PowerAuth API authentication object.- Returns:
- Remove token response.
- Throws:
PowerAuthAuthenticationException- In case authentication fails or request is invalid.
-