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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.getlime.security.powerauth.rest.api.model.response.EciesEncryptedResponse
    createToken(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.
    void
    Set the token verification service via setter injection.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TokenController

      public TokenController()
  • Method Details

    • setTokenServiceV3

      @Autowired public void setTokenServiceV3(TokenService tokenServiceV3)
      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.