-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #971: Add column for signature metadata
- Introduce abstraction for SignatureMetadata
- Loading branch information
Showing
5 changed files
with
61 additions
and
31 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...a/io/getlime/security/powerauth/app/server/database/model/PowerAuthSignatureMetadata.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,34 @@ | ||
package io.getlime.security.powerauth.app.server.database.model; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.NoArgsConstructor; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class PowerAuthSignatureMetadata implements SignatureMetadata<String, String> { | ||
|
||
private String signatureDataMethod; | ||
|
||
private String signatureDataUriId; | ||
|
||
|
||
@Override | ||
public String getMetadataParam1() { | ||
return signatureDataMethod; | ||
} | ||
|
||
@Override | ||
public void setMetadataParam1(String metadataParam1) { | ||
this.signatureDataMethod = metadataParam1; | ||
} | ||
|
||
@Override | ||
public String getMetadataParam2() { | ||
return signatureDataUriId; | ||
} | ||
|
||
@Override | ||
public void setMetadataParam2(String metadataParam2) { | ||
this.signatureDataUriId = metadataParam2; | ||
} | ||
} |
17 changes: 8 additions & 9 deletions
17
.../main/java/io/getlime/security/powerauth/app/server/database/model/SignatureMetadata.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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
package io.getlime.security.powerauth.app.server.database.model; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class SignatureMetadata { | ||
public interface SignatureMetadata<T1, T2> { | ||
|
||
private String signatureDataMethod; | ||
T1 getMetadataParam1(); | ||
|
||
void setMetadataParam1(T1 metadataParam1); | ||
|
||
T2 getMetadataParam2(); | ||
|
||
void setMetadataParam2(T2 metadataParam2); | ||
|
||
private String signatureDataUriId; | ||
} |
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