package ru.micord.ervu.security.webbpm.jwt;

public class UserIdsPair {
  private final String esiaUserId;
  private final String ervuId;

  public UserIdsPair(String idsConcatenated) {

    if (idsConcatenated == null) {
      this.esiaUserId = null;
      this.ervuId = null;
    }
    else {
      String[] ids = idsConcatenated.split(":");
      this.esiaUserId = ids[0];
      this.ervuId = ids.length == 2 ? ids[1] : null;
    }
  }

  public String getEsiaUserId() {
    return esiaUserId;
  }

  public String getErvuId() {
    return ervuId;
  }
}
