132 lines
2.0 KiB
Java
132 lines
2.0 KiB
Java
package de.tavolio.realm.key;
|
|
|
|
import de.tavolio.realm.RealmEntity;
|
|
import de.tavolio.realm.RealmScoped;
|
|
import jakarta.persistence.*;
|
|
|
|
@Entity
|
|
@Table(name = "keypair")
|
|
public class KeypairEntity implements RealmScoped
|
|
{
|
|
@Id
|
|
private String id;
|
|
|
|
@Column(columnDefinition = "bytea")
|
|
private byte[] privateKey;
|
|
|
|
private String type;
|
|
|
|
private String use;
|
|
|
|
private String alg;
|
|
|
|
private String crv;
|
|
|
|
private String x;
|
|
|
|
private String y;
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "realm_id")
|
|
private RealmEntity realm;
|
|
|
|
public String getId()
|
|
{
|
|
return id;
|
|
}
|
|
|
|
public KeypairEntity setId(String id)
|
|
{
|
|
this.id = id;
|
|
return this;
|
|
}
|
|
|
|
public byte[] getPrivateKey()
|
|
{
|
|
return privateKey;
|
|
}
|
|
|
|
public KeypairEntity setPrivateKey(byte[] privateKey)
|
|
{
|
|
this.privateKey = privateKey;
|
|
return this;
|
|
}
|
|
|
|
public RealmEntity getRealm()
|
|
{
|
|
return realm;
|
|
}
|
|
|
|
public KeypairEntity setRealm(RealmEntity realm)
|
|
{
|
|
this.realm = realm;
|
|
return this;
|
|
}
|
|
|
|
public String getType()
|
|
{
|
|
return type;
|
|
}
|
|
|
|
public KeypairEntity setType(String type)
|
|
{
|
|
this.type = type;
|
|
return this;
|
|
}
|
|
|
|
public String getUse()
|
|
{
|
|
return use;
|
|
}
|
|
|
|
public KeypairEntity setUse(String use)
|
|
{
|
|
this.use = use;
|
|
return this;
|
|
}
|
|
|
|
public String getAlg()
|
|
{
|
|
return alg;
|
|
}
|
|
|
|
public KeypairEntity setAlg(String alg)
|
|
{
|
|
this.alg = alg;
|
|
return this;
|
|
}
|
|
|
|
public String getCrv()
|
|
{
|
|
return crv;
|
|
}
|
|
|
|
public KeypairEntity setCrv(String crv)
|
|
{
|
|
this.crv = crv;
|
|
return this;
|
|
}
|
|
|
|
public String getX()
|
|
{
|
|
return x;
|
|
}
|
|
|
|
public KeypairEntity setX(String x)
|
|
{
|
|
this.x = x;
|
|
return this;
|
|
}
|
|
|
|
public String getY()
|
|
{
|
|
return y;
|
|
}
|
|
|
|
public KeypairEntity setY(String y)
|
|
{
|
|
this.y = y;
|
|
return this;
|
|
}
|
|
}
|