AuthInfo.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. package org.zhongzheng.common.secure;
  2. //
  3. // Source code recreated from a .class file by IntelliJ IDEA
  4. // (powered by FernFlower decompiler)
  5. //
  6. import com.fasterxml.jackson.databind.annotation.JsonSerialize;
  7. import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
  8. import io.swagger.annotations.ApiModel;
  9. import io.swagger.annotations.ApiModelProperty;
  10. @ApiModel(
  11. description = "认证信息"
  12. )
  13. public class AuthInfo {
  14. @ApiModelProperty("令牌")
  15. private String accessToken;
  16. @ApiModelProperty("令牌类型")
  17. private String tokenType;
  18. @ApiModelProperty("刷新令牌")
  19. private String refreshToken;
  20. @ApiModelProperty("用户ID")
  21. @JsonSerialize(
  22. using = ToStringSerializer.class
  23. )
  24. private Long userId;
  25. @ApiModelProperty("租户ID")
  26. private String tenantId;
  27. @ApiModelProperty("第三方系统ID")
  28. private String oauthId;
  29. @ApiModelProperty("头像")
  30. private String avatar = "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png";
  31. @ApiModelProperty("角色名")
  32. private String authority;
  33. @ApiModelProperty("用户名")
  34. private String userName;
  35. @ApiModelProperty("账号名")
  36. private String account;
  37. @ApiModelProperty("过期时间")
  38. private long expiresIn;
  39. @ApiModelProperty("许可证")
  40. private String license = "powered by zhongzheng";
  41. public AuthInfo() {
  42. }
  43. public String getAccessToken() {
  44. return this.accessToken;
  45. }
  46. public String getTokenType() {
  47. return this.tokenType;
  48. }
  49. public String getRefreshToken() {
  50. return this.refreshToken;
  51. }
  52. public Long getUserId() {
  53. return this.userId;
  54. }
  55. public String getTenantId() {
  56. return this.tenantId;
  57. }
  58. public String getOauthId() {
  59. return this.oauthId;
  60. }
  61. public String getAvatar() {
  62. return this.avatar;
  63. }
  64. public String getAuthority() {
  65. return this.authority;
  66. }
  67. public String getUserName() {
  68. return this.userName;
  69. }
  70. public String getAccount() {
  71. return this.account;
  72. }
  73. public long getExpiresIn() {
  74. return this.expiresIn;
  75. }
  76. public String getLicense() {
  77. return this.license;
  78. }
  79. public void setAccessToken(final String accessToken) {
  80. this.accessToken = accessToken;
  81. }
  82. public void setTokenType(final String tokenType) {
  83. this.tokenType = tokenType;
  84. }
  85. public void setRefreshToken(final String refreshToken) {
  86. this.refreshToken = refreshToken;
  87. }
  88. public void setUserId(final Long userId) {
  89. this.userId = userId;
  90. }
  91. public void setTenantId(final String tenantId) {
  92. this.tenantId = tenantId;
  93. }
  94. public void setOauthId(final String oauthId) {
  95. this.oauthId = oauthId;
  96. }
  97. public void setAvatar(final String avatar) {
  98. this.avatar = avatar;
  99. }
  100. public void setAuthority(final String authority) {
  101. this.authority = authority;
  102. }
  103. public void setUserName(final String userName) {
  104. this.userName = userName;
  105. }
  106. public void setAccount(final String account) {
  107. this.account = account;
  108. }
  109. public void setExpiresIn(final long expiresIn) {
  110. this.expiresIn = expiresIn;
  111. }
  112. public void setLicense(final String license) {
  113. this.license = license;
  114. }
  115. public boolean equals(final Object o) {
  116. if (o == this) {
  117. return true;
  118. } else if (!(o instanceof AuthInfo)) {
  119. return false;
  120. } else {
  121. AuthInfo other = (AuthInfo)o;
  122. if (!other.canEqual(this)) {
  123. return false;
  124. } else if (this.getExpiresIn() != other.getExpiresIn()) {
  125. return false;
  126. } else {
  127. label145: {
  128. Object this$userId = this.getUserId();
  129. Object other$userId = other.getUserId();
  130. if (this$userId == null) {
  131. if (other$userId == null) {
  132. break label145;
  133. }
  134. } else if (this$userId.equals(other$userId)) {
  135. break label145;
  136. }
  137. return false;
  138. }
  139. Object this$accessToken = this.getAccessToken();
  140. Object other$accessToken = other.getAccessToken();
  141. if (this$accessToken == null) {
  142. if (other$accessToken != null) {
  143. return false;
  144. }
  145. } else if (!this$accessToken.equals(other$accessToken)) {
  146. return false;
  147. }
  148. Object this$tokenType = this.getTokenType();
  149. Object other$tokenType = other.getTokenType();
  150. if (this$tokenType == null) {
  151. if (other$tokenType != null) {
  152. return false;
  153. }
  154. } else if (!this$tokenType.equals(other$tokenType)) {
  155. return false;
  156. }
  157. label124: {
  158. Object this$refreshToken = this.getRefreshToken();
  159. Object other$refreshToken = other.getRefreshToken();
  160. if (this$refreshToken == null) {
  161. if (other$refreshToken == null) {
  162. break label124;
  163. }
  164. } else if (this$refreshToken.equals(other$refreshToken)) {
  165. break label124;
  166. }
  167. return false;
  168. }
  169. Object this$tenantId = this.getTenantId();
  170. Object other$tenantId = other.getTenantId();
  171. if (this$tenantId == null) {
  172. if (other$tenantId != null) {
  173. return false;
  174. }
  175. } else if (!this$tenantId.equals(other$tenantId)) {
  176. return false;
  177. }
  178. Object this$oauthId = this.getOauthId();
  179. Object other$oauthId = other.getOauthId();
  180. if (this$oauthId == null) {
  181. if (other$oauthId != null) {
  182. return false;
  183. }
  184. } else if (!this$oauthId.equals(other$oauthId)) {
  185. return false;
  186. }
  187. label103: {
  188. Object this$avatar = this.getAvatar();
  189. Object other$avatar = other.getAvatar();
  190. if (this$avatar == null) {
  191. if (other$avatar == null) {
  192. break label103;
  193. }
  194. } else if (this$avatar.equals(other$avatar)) {
  195. break label103;
  196. }
  197. return false;
  198. }
  199. Object this$authority = this.getAuthority();
  200. Object other$authority = other.getAuthority();
  201. if (this$authority == null) {
  202. if (other$authority != null) {
  203. return false;
  204. }
  205. } else if (!this$authority.equals(other$authority)) {
  206. return false;
  207. }
  208. label89: {
  209. Object this$userName = this.getUserName();
  210. Object other$userName = other.getUserName();
  211. if (this$userName == null) {
  212. if (other$userName == null) {
  213. break label89;
  214. }
  215. } else if (this$userName.equals(other$userName)) {
  216. break label89;
  217. }
  218. return false;
  219. }
  220. Object this$account = this.getAccount();
  221. Object other$account = other.getAccount();
  222. if (this$account == null) {
  223. if (other$account != null) {
  224. return false;
  225. }
  226. } else if (!this$account.equals(other$account)) {
  227. return false;
  228. }
  229. Object this$license = this.getLicense();
  230. Object other$license = other.getLicense();
  231. if (this$license == null) {
  232. if (other$license == null) {
  233. return true;
  234. }
  235. } else if (this$license.equals(other$license)) {
  236. return true;
  237. }
  238. return false;
  239. }
  240. }
  241. }
  242. protected boolean canEqual(final Object other) {
  243. return other instanceof AuthInfo;
  244. }
  245. public int hashCode() {
  246. int result = 1;
  247. long $expiresIn = this.getExpiresIn();
  248. result = result * 59 + (int)($expiresIn >>> 32 ^ $expiresIn);
  249. Object $userId = this.getUserId();
  250. result = result * 59 + ($userId == null ? 43 : $userId.hashCode());
  251. Object $accessToken = this.getAccessToken();
  252. result = result * 59 + ($accessToken == null ? 43 : $accessToken.hashCode());
  253. Object $tokenType = this.getTokenType();
  254. result = result * 59 + ($tokenType == null ? 43 : $tokenType.hashCode());
  255. Object $refreshToken = this.getRefreshToken();
  256. result = result * 59 + ($refreshToken == null ? 43 : $refreshToken.hashCode());
  257. Object $tenantId = this.getTenantId();
  258. result = result * 59 + ($tenantId == null ? 43 : $tenantId.hashCode());
  259. Object $oauthId = this.getOauthId();
  260. result = result * 59 + ($oauthId == null ? 43 : $oauthId.hashCode());
  261. Object $avatar = this.getAvatar();
  262. result = result * 59 + ($avatar == null ? 43 : $avatar.hashCode());
  263. Object $authority = this.getAuthority();
  264. result = result * 59 + ($authority == null ? 43 : $authority.hashCode());
  265. Object $userName = this.getUserName();
  266. result = result * 59 + ($userName == null ? 43 : $userName.hashCode());
  267. Object $account = this.getAccount();
  268. result = result * 59 + ($account == null ? 43 : $account.hashCode());
  269. Object $license = this.getLicense();
  270. result = result * 59 + ($license == null ? 43 : $license.hashCode());
  271. return result;
  272. }
  273. public String toString() {
  274. return "AuthInfo(accessToken=" + this.getAccessToken() + ", tokenType=" + this.getTokenType() + ", refreshToken=" + this.getRefreshToken() + ", userId=" + this.getUserId() + ", tenantId=" + this.getTenantId() + ", oauthId=" + this.getOauthId() + ", avatar=" + this.getAvatar() + ", authority=" + this.getAuthority() + ", userName=" + this.getUserName() + ", account=" + this.getAccount() + ", expiresIn=" + this.getExpiresIn() + ", license=" + this.getLicense() + ")";
  275. }
  276. }