类 SaClientModel

java.lang.Object
cn.dev33.satoken.oauth2.data.model.loader.SaClientModel
所有已实现的接口:
Serializable

public class SaClientModel extends Object implements Serializable
Client应用信息 Model
从以下版本开始:
1.23.0
作者:
click33
另请参阅:
  • 字段详细资料

    • clientId

      public String clientId
      应用id
    • clientSecret

      public String clientSecret
      应用秘钥
    • contractScopes

      public List<String> contractScopes
      应用签约的所有权限
    • allowRedirectUris

      public List<String> allowRedirectUris
      应用允许授权的所有 redirect_uri
    • allowGrantTypes

      public List<String> allowGrantTypes
      应用允许的所有 grant_type
    • isNewRefresh

      public Boolean isNewRefresh
      单独配置此Client:是否在每次 Refresh-Token 刷新 Access-Token 时,产生一个新的 Refresh-Token [默认取全局配置]
    • accessTokenTimeout

      public long accessTokenTimeout
      单独配置此Client:Access-Token 保存的时间(单位秒) [默认取全局配置]
    • refreshTokenTimeout

      public long refreshTokenTimeout
      单独配置此Client:Refresh-Token 保存的时间(单位秒) [默认取全局配置]
    • clientTokenTimeout

      public long clientTokenTimeout
      单独配置此Client:Client-Token 保存的时间(单位秒) [默认取全局配置]
    • lowerClientTokenTimeout

      public long lowerClientTokenTimeout
      单独配置此Client:Lower-Client-Token 保存的时间(单位:秒) [默认取全局配置]
  • 构造器详细资料

    • SaClientModel

      public SaClientModel()
    • SaClientModel

      public SaClientModel(String clientId, String clientSecret, List<String> contractScopes, List<String> allowRedirectUris)
  • 方法详细资料

    • getClientId

      public String getClientId()
      返回:
      应用id
    • setClientId

      public SaClientModel setClientId(String clientId)
      参数:
      clientId - 应用id
      返回:
      对象自身
    • getClientSecret

      public String getClientSecret()
      返回:
      应用秘钥
    • setClientSecret

      public SaClientModel setClientSecret(String clientSecret)
      参数:
      clientSecret - 应用秘钥
      返回:
      对象自身
    • getContractScopes

      public List<String> getContractScopes()
      返回:
      应用签约的所有权限
    • setContractScopes

      public SaClientModel setContractScopes(List<String> contractScopes)
      参数:
      contractScopes - 应用签约的所有权限
      返回:
      对象自身
    • getAllowRedirectUris

      public List<String> getAllowRedirectUris()
      返回:
      应用允许授权的所有 redirect_uri
    • setAllowRedirectUris

      public SaClientModel setAllowRedirectUris(List<String> allowRedirectUris)
      参数:
      allowRedirectUris - 应用允许授权的所有 redirect_uri
      返回:
      对象自身
    • getAllowGrantTypes

      public List<String> getAllowGrantTypes()
      返回:
      应用允许的所有 grant_type
    • setAllowGrantTypes

      public SaClientModel setAllowGrantTypes(List<String> allowGrantTypes)
      应用允许的所有 grant_type
      参数:
      allowGrantTypes - /
      返回:
      /
    • getIsNewRefresh

      public Boolean getIsNewRefresh()
      返回:
      此Client:是否在每次 Refresh-Token 刷新 Access-Token 时,产生一个新的 Refresh-Token [默认取全局配置]
    • setIsNewRefresh

      public SaClientModel setIsNewRefresh(Boolean isNewRefresh)
      参数:
      isNewRefresh - 单独配置此Client:是否在每次 Refresh-Token 刷新 Access-Token 时,产生一个新的 Refresh-Token [默认取全局配置]
      返回:
      对象自身
    • getAccessTokenTimeout

      public long getAccessTokenTimeout()
      返回:
      此Client:Access-Token 保存的时间(单位秒) [默认取全局配置]
    • setAccessTokenTimeout

      public SaClientModel setAccessTokenTimeout(long accessTokenTimeout)
      参数:
      accessTokenTimeout - 单独配置此Client:Access-Token 保存的时间(单位秒) [默认取全局配置]
      返回:
      对象自身
    • getRefreshTokenTimeout

      public long getRefreshTokenTimeout()
      返回:
      此Client:Refresh-Token 保存的时间(单位秒) [默认取全局配置]
    • setRefreshTokenTimeout

      public SaClientModel setRefreshTokenTimeout(long refreshTokenTimeout)
      参数:
      refreshTokenTimeout - 单独配置此Client:Refresh-Token 保存的时间(单位秒) [默认取全局配置]
      返回:
      对象自身
    • getClientTokenTimeout

      public long getClientTokenTimeout()
      返回:
      此Client:Client-Token 保存的时间(单位秒) [默认取全局配置]
    • setClientTokenTimeout

      public SaClientModel setClientTokenTimeout(long clientTokenTimeout)
      参数:
      clientTokenTimeout - 单独配置此Client:Client-Token 保存的时间(单位秒) [默认取全局配置]
      返回:
      对象自身
    • getLowerClientTokenTimeout

      public long getLowerClientTokenTimeout()
      返回:
      此Client:Lower-Client-Token 保存的时间(单位:秒) [默认取全局配置]
    • setLowerClientTokenTimeout

      public SaClientModel setLowerClientTokenTimeout(long lowerClientTokenTimeout)
      参数:
      lowerClientTokenTimeout - 单独配置此Client:Lower-Client-Token 保存的时间(单位:秒) [默认取全局配置]
      返回:
      对象自身
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • addContractScopes

      public SaClientModel addContractScopes(String... scopes)
      参数:
      scopes - 添加应用签约的所有权限
      返回:
      对象自身
    • addAllowRedirectUris

      public SaClientModel addAllowRedirectUris(String... redirectUris)
      参数:
      redirectUris - 添加应用允许授权的所有 redirect_uri
      返回:
      对象自身
    • addAllowGrantTypes

      public SaClientModel addAllowGrantTypes(String... grantTypes)
      参数:
      grantTypes - 应用允许的所有 grant_type
      返回:
      对象自身