package com.qianwen.core.secure.provider; import io.swagger.annotations.ApiModelProperty; public class ClientDetails implements IClientDetails { @ApiModelProperty("客户端id") private String clientId; @ApiModelProperty("客户端密钥") private String clientSecret; @ApiModelProperty("令牌过期秒数") private Integer accessTokenValidity; @ApiModelProperty("刷新令牌过期秒数") private Integer refreshTokenValidity; public void setClientId(final String clientId) { this.clientId = clientId; } public void setClientSecret(final String clientSecret) { this.clientSecret = clientSecret; } public void setAccessTokenValidity(final Integer accessTokenValidity) { this.accessTokenValidity = accessTokenValidity; } public void setRefreshTokenValidity(final Integer refreshTokenValidity) { this.refreshTokenValidity = refreshTokenValidity; } public boolean equals(final Object o) { if (o == this) { return true; } if (o instanceof ClientDetails) { ClientDetails other = (ClientDetails) o; if (other.canEqual(this)) { Object this$accessTokenValidity = getAccessTokenValidity(); Object other$accessTokenValidity = other.getAccessTokenValidity(); if (this$accessTokenValidity == null) { if (other$accessTokenValidity != null) { return false; } } else if (!this$accessTokenValidity.equals(other$accessTokenValidity)) { return false; } Object this$refreshTokenValidity = getRefreshTokenValidity(); Object other$refreshTokenValidity = other.getRefreshTokenValidity(); if (this$refreshTokenValidity == null) { if (other$refreshTokenValidity != null) { return false; } } else if (!this$refreshTokenValidity.equals(other$refreshTokenValidity)) { return false; } Object this$clientId = getClientId(); Object other$clientId = other.getClientId(); if (this$clientId == null) { if (other$clientId != null) { return false; } } else if (!this$clientId.equals(other$clientId)) { return false; } Object this$clientSecret = getClientSecret(); Object other$clientSecret = other.getClientSecret(); return this$clientSecret == null ? other$clientSecret == null : this$clientSecret.equals(other$clientSecret); } return false; } return false; } protected boolean canEqual(final Object other) { return other instanceof ClientDetails; } public int hashCode() { Object $accessTokenValidity = getAccessTokenValidity(); int result = (1 * 59) + ($accessTokenValidity == null ? 43 : $accessTokenValidity.hashCode()); Object $refreshTokenValidity = getRefreshTokenValidity(); int result2 = (result * 59) + ($refreshTokenValidity == null ? 43 : $refreshTokenValidity.hashCode()); Object $clientId = getClientId(); int result3 = (result2 * 59) + ($clientId == null ? 43 : $clientId.hashCode()); Object $clientSecret = getClientSecret(); return (result3 * 59) + ($clientSecret == null ? 43 : $clientSecret.hashCode()); } public String toString() { return "ClientDetails(clientId=" + getClientId() + ", clientSecret=" + getClientSecret() + ", accessTokenValidity=" + getAccessTokenValidity() + ", refreshTokenValidity=" + getRefreshTokenValidity() + ")"; } @Override // org.springblade.core.secure.provider.IClientDetails public String getClientId() { return this.clientId; } @Override // org.springblade.core.secure.provider.IClientDetails public String getClientSecret() { return this.clientSecret; } @Override // org.springblade.core.secure.provider.IClientDetails public Integer getAccessTokenValidity() { return this.accessTokenValidity; } @Override // org.springblade.core.secure.provider.IClientDetails public Integer getRefreshTokenValidity() { return this.refreshTokenValidity; } }