19 package org.turro.elephant.entities.db;
21 import com.jayway.jsonpath.JsonPath;
22 import java.nio.charset.StandardCharsets;
23 import java.util.Date;
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.Id;
27 import javax.persistence.Lob;
28 import javax.persistence.Temporal;
29 import org.turro.string.Strings;
30 import org.turro.action.Contacts;
31 import org.turro.elephant.sso.ISSOIdentity;
32 import org.turro.log.WebLoggers;
33 import org.turro.plugin.contacts.IContact;
43 private String clientAssertion;
45 private byte[] clientId;
47 private String idContact;
49 @Temporal(value = javax.persistence.TemporalType.TIMESTAMP)
50 private java.util.Date dateUsed;
54 private String details;
56 private String remoteIp;
64 return clientAssertion.getBytes(StandardCharsets.UTF_8);
68 this.clientAssertion =
new String(clientAssertion, StandardCharsets.UTF_8);
77 this.clientId = clientId;
86 this.idContact = idContact;
95 this.dateUsed = dateUsed;
104 this.details = details;
113 this.remoteIp = remoteIp;
129 return (Strings.isBlank(geoIp) || geoIp.contains(
"error")) ?
"" : JsonPath.read(geoIp, path);
130 }
catch (Exception ex) {
138 private transient IContact _contact;
142 if(_contact ==
null) {
150 idContact = _contact !=
null ? _contact.
getId() :
null;
void setGeoIp(String geoIp)
byte[] getClientAssertion()
void setDetails(String details)
Object readGeo(String path)
void setDateUsed(Date dateUsed)
void setClientId(byte[] clientId)
void setIdContact(String idContact)
void setClientAssertion(byte[] clientAssertion)
void setContact(IContact contact)
void setRemoteIp(String remoteIp)
WebLoggers exception(Throwable throwable)
static WebLoggers info(Object entity)