def core__encode_token exp, payload
      exp = 1.day.from_now unless exp
      payload[:exp] = exp.to_i
      JWT.encode(payload, Rails.application.secrets.secret_key_base, 'HS256')
    end
def core__encode_token exp, payload
      exp = 1.day.from_now unless exp
      payload[:exp] = exp.to_i
      JWT.encode(payload, Rails.application.secrets.secret_key_base, 'HS256')
    end
This functon return a token with encrypted payload information.