This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored extensions and fixed tests
Signed-off-by: Aashir Siddiqui <[email protected]>
- Loading branch information
Showing
13 changed files
with
849 additions
and
226 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
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
55 changes: 55 additions & 0 deletions
55
...asa.auth.couchdb/src/main/java/dev/galasa/auth/couchdb/internal/beans/FrontEndClient.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,55 @@ | ||
package dev.galasa.auth.couchdb.internal.beans; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import dev.galasa.framework.spi.auth.IFrontEndClient; | ||
import java.time.Instant; | ||
|
||
public class FrontEndClient implements IFrontEndClient{ | ||
|
||
@SerializedName("client-name") | ||
private String clientName; | ||
|
||
@SerializedName("last-login") | ||
private Instant lastLogin; | ||
|
||
// No-arg constructor | ||
public FrontEndClient() {} | ||
|
||
// Parameterized constructor | ||
public FrontEndClient(String clientName, Instant lastLoggedIn) { | ||
this.clientName = clientName; | ||
this.lastLogin = lastLoggedIn; | ||
} | ||
|
||
public FrontEndClient(IFrontEndClient fClient){ | ||
this.clientName = fClient.getClientName(); | ||
this.lastLogin = fClient.getLastLogin(); | ||
} | ||
|
||
// Getter and Setter for lastLoggedIn | ||
public Instant getLastLogin() { | ||
return lastLogin; | ||
} | ||
|
||
@Override | ||
public void setLastLogin(Instant lastLoginTime) { | ||
this.lastLogin = lastLoginTime; | ||
} | ||
|
||
// Getter and Setter for clientName | ||
public String getClientName() { | ||
return clientName; | ||
} | ||
|
||
public void setClientName(String clientName) { | ||
this.clientName = clientName; | ||
} | ||
|
||
// toString method to display client details | ||
@Override | ||
public String toString() { | ||
return "Client [clientName=" + clientName + ", lastLoggedIn=" + lastLogin + "]"; | ||
} | ||
|
||
} |
Oops, something went wrong.