diff options
author | 2022-12-21 02:36:49 +0300 | |
---|---|---|
committer | 2022-12-21 02:36:49 +0300 | |
commit | 1ad1b73a7b85e7e907de1870991a8849487f9543 (patch) | |
tree | 4cda16090472d739a79ab57efbc94a6ad4e8ddc9 /src/main/java/com/juick/model/ext/vk/Token.java | |
parent | 8a32b359eed27ab1d4e054ffed99b6602fa18acf (diff) |
Social logins: adopt records
Diffstat (limited to 'src/main/java/com/juick/model/ext/vk/Token.java')
-rw-r--r-- | src/main/java/com/juick/model/ext/vk/Token.java | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/main/java/com/juick/model/ext/vk/Token.java b/src/main/java/com/juick/model/ext/vk/Token.java index 42a3195d..7623a3e9 100644 --- a/src/main/java/com/juick/model/ext/vk/Token.java +++ b/src/main/java/com/juick/model/ext/vk/Token.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2020, Juick + * Copyright (C) 2008-2022, Juick * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -24,23 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Created by vitalyster on 28.11.2016. */ @JsonIgnoreProperties(ignoreUnknown = true) -public class Token { - private Long userId; - private String accessToken; - private String expiresIn; - - @JsonProperty("user_id") - public Long getUserId() { - return userId; - } - - @JsonProperty("access_token") - public String getAccessToken() { - return accessToken; - } - - @JsonProperty("expires_in") - public String getExpiresIn() { - return expiresIn; - } +public record Token(@JsonProperty("user_id") Long userId, @JsonProperty("access_token") String accessToken, + @JsonProperty("expires_in") String expiresIn) { } |