Skip to content

Add ExpiresAt field to SSH Key object #857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/main/java/org/gitlab4j/api/models/SshKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class SshKey {
private String title;
private String key;
private Date createdAt;
private Date expiresAt;

private Long userId;

Expand Down Expand Up @@ -47,6 +48,14 @@ public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}

public Date getExpiresAt() {
return expiresAt;
}

public void setExpiresAt(Date expiresAt) {
this.expiresAt = expiresAt;
}

@JsonIgnore
public Long getUserId() {
return userId;
Expand Down
11 changes: 6 additions & 5 deletions src/test/resources/org/gitlab4j/api/sshkey.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"id": 1,
"title": "Public key",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
"created_at": "2014-08-01T14:47:39.080Z"
{
"id": 1,
"title": "Public key",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
"created_at": "2014-08-01T14:47:39.080Z",
"expires_at": "2015-08-01T14:47:39.080Z"
}