java.lang.Object
io.getlime.security.powerauth.rest.api.spring.service.v3.TokenService

@Service("tokenServiceV3")
public class TokenService
extends Object
Service implementing token functionality.

PowerAuth protocol versions:

  • 3.0
Author:
Roman Strobl, roman.strobl@wultra.com
  • Constructor Summary

    Constructors
    Constructor Description
    TokenService()  
  • Method Summary

    Modifier and Type Method Description
    io.getlime.security.powerauth.rest.api.model.response.v3.EciesEncryptedResponse createToken​(io.getlime.security.powerauth.rest.api.model.request.v3.EciesEncryptedRequest request, PowerAuthApiAuthentication authentication)
    Create token.
    io.getlime.security.powerauth.rest.api.model.response.v3.TokenRemoveResponse removeToken​(io.getlime.security.powerauth.rest.api.model.request.v3.TokenRemoveRequest request, PowerAuthApiAuthentication authentication)
    Remove token.
    void setPowerAuthClient​(com.wultra.security.powerauth.client.PowerAuthClient powerAuthClient)
    Set PowerAuth service client via setter injection.

    Methods inherited from class java.lang.Object

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

    • TokenService

      public TokenService()
  • Method Details

    • setPowerAuthClient

      @Autowired public void setPowerAuthClient​(com.wultra.security.powerauth.client.PowerAuthClient powerAuthClient)
      Set PowerAuth service client via setter injection.
      Parameters:
      powerAuthClient - PowerAuth service client.
    • createToken

      public io.getlime.security.powerauth.rest.api.model.response.v3.EciesEncryptedResponse createToken​(io.getlime.security.powerauth.rest.api.model.request.v3.EciesEncryptedRequest request, PowerAuthApiAuthentication authentication) throws PowerAuthAuthenticationException
      Create token.
      Parameters:
      request - ECIES encrypted create token request.
      authentication - PowerAuth API authentication object.
      Returns:
      ECIES encrypted create token response.
      Throws:
      PowerAuthAuthenticationException - In case token could not be created.
    • removeToken

      public io.getlime.security.powerauth.rest.api.model.response.v3.TokenRemoveResponse removeToken​(io.getlime.security.powerauth.rest.api.model.request.v3.TokenRemoveRequest request, PowerAuthApiAuthentication authentication) throws PowerAuthAuthenticationException
      Remove token.
      Parameters:
      request - Remove token request.
      authentication - PowerAuth API authentication object.
      Returns:
      Remove token response.
      Throws:
      PowerAuthAuthenticationException - In case authentication fails.