-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
log audit event when signing user identity
- Loading branch information
1 parent
b1ea583
commit f6ce0c0
Showing
12 changed files
with
230 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
backend/src/main/java/org/cryptomator/hub/entities/events/SignedWotIdEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
package org.cryptomator.hub.entities.events; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.DiscriminatorValue; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.Table; | ||
|
||
import java.util.Objects; | ||
import java.util.UUID; | ||
|
||
@Entity | ||
@Table(name = "audit_event_sign_wot_id") | ||
@DiscriminatorValue(SignedWotIdEvent.TYPE) | ||
public class SignedWotIdEvent extends AuditEvent { | ||
|
||
public static final String TYPE = "SIGN_WOT_ID"; | ||
|
||
@Column(name = "user_id") | ||
private String userId; | ||
|
||
@Column(name = "signer_id") | ||
private String signerId; | ||
|
||
@Column(name = "signer_key") | ||
private String signerKey; | ||
|
||
@Column(name = "signature") | ||
private String signature; | ||
|
||
public String getUserId() { | ||
return userId; | ||
} | ||
|
||
public void setUserId(String userId) { | ||
this.userId = userId; | ||
} | ||
|
||
public String getSignerId() { | ||
return signerId; | ||
} | ||
|
||
public void setSignerId(String signerId) { | ||
this.signerId = signerId; | ||
} | ||
|
||
public String getSignerKey() { | ||
return signerKey; | ||
} | ||
|
||
public void setSignerKey(String signerKey) { | ||
this.signerKey = signerKey; | ||
} | ||
|
||
public String getSignature() { | ||
return signature; | ||
} | ||
|
||
public void setSignature(String signature) { | ||
this.signature = signature; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
SignedWotIdEvent that = (SignedWotIdEvent) o; | ||
return super.equals(that) // | ||
&& Objects.equals(userId, that.userId) // | ||
&& Objects.equals(signerId, that.signerId) // | ||
&& Objects.equals(signerKey, that.signerKey) // | ||
&& Objects.equals(signature, that.signature); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(super.getId(), userId, signerId, signerKey, signature); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.