code: public AuthorisationData convertIdentifyingToken(IdentifyingToken token) {
          AuthorisationData authData = new AuthorisationData();
          authData.setIdTag(token.getToken());
  
          //The OCPP spec describes that the IdTagInfo should not be present in case the charging station has to remove the entry from the list
          IdentifyingToken.AuthenticationStatus status = token.getAuthenticationStatus();
          if (status != null && !IdentifyingToken.AuthenticationStatus.DELETED.equals(status)) {
              IdTagInfo info = new IdTagInfo();
              switch (token.getAuthenticationStatus()) {
                  case ACCEPTED:
                      info.setStatus(AuthorizationStatus.ACCEPTED);
                      break;
                  case BLOCKED:
                      info.setStatus(AuthorizationStatus.BLOCKED);
                      break;
                  case EXPIRED:
                      info.setStatus(AuthorizationStatus.EXPIRED);
                      break;
                  case INVALID:
                      info.setStatus(AuthorizationStatus.INVALID);
                      break;
                  case CONCURRENT_TX:
                      info.setStatus(AuthorizationStatus.CONCURRENT_TX);
                      break;
                  default:
                      throw new AssertionError(String.format("Unknown authentication status [%s] in given identifying token [%s].", token.getAuthenticationStatus(), token.getToken()));
              }
              authData.setIdTagInfo(info);
          }
  
          return authData;
      }
docs: Converts a {@code IdentifyingToken} to a {@code AuthorisationData} object. If the authentication status is not
  null or DELETED then the IdTagInfo will be set based on the authentication status.
  
  @param token    identifying token.
  @return authorisation data object.