类 SaOAuth2ServerConfig

java.lang.Object
cn.dev33.satoken.oauth2.config.SaOAuth2ServerConfig
所有已实现的接口:
Serializable

public class SaOAuth2ServerConfig extends Object implements Serializable
Sa-Token OAuth2 Server 端 配置类 Model
从以下版本开始:
1.19.0
作者:
click33
另请参阅:
  • 字段详细资料

    • enableAuthorizationCode

      public Boolean enableAuthorizationCode
      是否打开模式:授权码(Authorization Code)
    • enableImplicit

      public Boolean enableImplicit
      是否打开模式:隐藏式(Implicit)
    • enablePassword

      public Boolean enablePassword
      是否打开模式:密码式(Password)
    • enableClientCredentials

      public Boolean enableClientCredentials
      是否打开模式:凭证式(Client Credentials)
    • isNewRefresh

      public Boolean isNewRefresh
      是否在每次 Refresh-Token 刷新 Access-Token 时,产生一个新的 Refresh-Token
    • codeTimeout

      public long codeTimeout
      Code授权码 保存的时间(单位:秒) 默认五分钟
    • accessTokenTimeout

      public long accessTokenTimeout
      Access-Token 保存的时间(单位:秒) 默认两个小时
    • refreshTokenTimeout

      public long refreshTokenTimeout
      Refresh-Token 保存的时间(单位:秒) 默认30 天
    • clientTokenTimeout

      public long clientTokenTimeout
      Client-Token 保存的时间(单位:秒) 默认两个小时
    • lowerClientTokenTimeout

      public long lowerClientTokenTimeout
      Lower-Client-Token 保存的时间(单位:秒) 默认为 -1,代表延续 Client-Token 有效期
    • openidDigestPrefix

      public String openidDigestPrefix
      默认 openid 生成算法中使用的摘要前缀
    • higherScope

      public String higherScope
      指定高级权限,多个用逗号隔开
    • lowerScope

      public String lowerScope
      指定低级权限,多个用逗号隔开
    • mode4ReturnAccessToken

      public Boolean mode4ReturnAccessToken
      模式4是否返回 AccessToken 字段
    • hideStatusField

      public Boolean hideStatusField
      是否在返回值中隐藏默认的状态字段 (code、msg、data)
    • clients

      public Map<String,SaClientModel> clients
      client 列表
    • notLoginView

      public SaOAuth2NotLoginViewFunction notLoginView
      OAuth-Server端:未登录时返回的View
    • confirmView

      public SaOAuth2ConfirmViewFunction confirmView
      OAuth-Server端:确认授权时返回的View
    • doLoginHandle

      public SaOAuth2DoLoginHandleFunction doLoginHandle
      OAuth-Server端:登录函数
  • 构造器详细资料

    • SaOAuth2ServerConfig

      public SaOAuth2ServerConfig()
  • 方法详细资料

    • getEnableAuthorizationCode

      public Boolean getEnableAuthorizationCode()
      返回:
      enableCode
    • setEnableAuthorizationCode

      public SaOAuth2ServerConfig setEnableAuthorizationCode(Boolean enableAuthorizationCode)
      参数:
      enableAuthorizationCode - 要设置的 enableAuthorizationCode
      返回:
      /
    • getEnableImplicit

      public Boolean getEnableImplicit()
      返回:
      enableImplicit
    • setEnableImplicit

      public SaOAuth2ServerConfig setEnableImplicit(Boolean enableImplicit)
      参数:
      enableImplicit - 要设置的 enableImplicit
      返回:
      /
    • getEnablePassword

      public Boolean getEnablePassword()
      返回:
      enablePassword
    • setEnablePassword

      public SaOAuth2ServerConfig setEnablePassword(Boolean enablePassword)
      参数:
      enablePassword - 要设置的 enablePassword
    • getEnableClientCredentials

      public Boolean getEnableClientCredentials()
      返回:
      enableClientCredentials
    • setEnableClientCredentials

      public SaOAuth2ServerConfig setEnableClientCredentials(Boolean enableClientCredentials)
      参数:
      enableClientCredentials - 要设置的 enableClientCredentials
      返回:
      /
    • getIsNewRefresh

      public Boolean getIsNewRefresh()
      返回:
      isNewRefresh
    • setIsNewRefresh

      public SaOAuth2ServerConfig setIsNewRefresh(Boolean isNewRefresh)
      参数:
      isNewRefresh - 要设置的 isNewRefresh
      返回:
      /
    • getCodeTimeout

      public long getCodeTimeout()
      返回:
      codeTimeout
    • setCodeTimeout

      public SaOAuth2ServerConfig setCodeTimeout(long codeTimeout)
      参数:
      codeTimeout - 要设置的 codeTimeout
      返回:
      对象自身
    • getAccessTokenTimeout

      public long getAccessTokenTimeout()
      返回:
      accessTokenTimeout
    • setAccessTokenTimeout

      public SaOAuth2ServerConfig setAccessTokenTimeout(long accessTokenTimeout)
      参数:
      accessTokenTimeout - 要设置的 accessTokenTimeout
      返回:
      对象自身
    • getRefreshTokenTimeout

      public long getRefreshTokenTimeout()
      返回:
      refreshTokenTimeout
    • setRefreshTokenTimeout

      public SaOAuth2ServerConfig setRefreshTokenTimeout(long refreshTokenTimeout)
      参数:
      refreshTokenTimeout - 要设置的 refreshTokenTimeout
      返回:
      对象自身
    • getClientTokenTimeout

      public long getClientTokenTimeout()
      返回:
      clientTokenTimeout
    • setClientTokenTimeout

      public SaOAuth2ServerConfig setClientTokenTimeout(long clientTokenTimeout)
      参数:
      clientTokenTimeout - 要设置的 clientTokenTimeout
      返回:
      对象自身
    • getLowerClientTokenTimeout

      public long getLowerClientTokenTimeout()
      返回:
      lowerClientTokenTimeout
    • setLowerClientTokenTimeout

      public SaOAuth2ServerConfig setLowerClientTokenTimeout(long lowerClientTokenTimeout)
      参数:
      lowerClientTokenTimeout - 要设置的 lowerClientTokenTimeout
      返回:
      对象自身
    • getOpenidDigestPrefix

      public String getOpenidDigestPrefix()
      返回:
      openidDigestPrefix
    • setOpenidDigestPrefix

      public SaOAuth2ServerConfig setOpenidDigestPrefix(String openidDigestPrefix)
      参数:
      openidDigestPrefix - 要设置的 openidDigestPrefix
      返回:
      对象自身
    • getHigherScope

      public String getHigherScope()
      获取 指定高级权限,多个用逗号隔开
      返回:
      higherScope 指定高级权限,多个用逗号隔开
    • setHigherScope

      public SaOAuth2ServerConfig setHigherScope(String higherScope)
      设置 指定高级权限,多个用逗号隔开
      参数:
      higherScope - 指定高级权限,多个用逗号隔开
      返回:
      /
    • getLowerScope

      public String getLowerScope()
      获取 指定低级权限,多个用逗号隔开
      返回:
      lowerScope 指定低级权限,多个用逗号隔开
    • setLowerScope

      public SaOAuth2ServerConfig setLowerScope(String lowerScope)
      设置 指定低级权限,多个用逗号隔开
      参数:
      lowerScope - 指定低级权限,多个用逗号隔开
      返回:
      /
    • getMode4ReturnAccessToken

      public Boolean getMode4ReturnAccessToken()
      返回:
      mode4ReturnAccessToken
    • setMode4ReturnAccessToken

      public SaOAuth2ServerConfig setMode4ReturnAccessToken(Boolean mode4ReturnAccessToken)
      参数:
      mode4ReturnAccessToken - 要设置的 mode4ReturnAccessToken
    • getHideStatusField

      public Boolean getHideStatusField()
      返回:
      hideStatusField
    • setHideStatusField

      public SaOAuth2ServerConfig setHideStatusField(Boolean hideStatusField)
      参数:
      hideStatusField - 要设置的 hideStatusField
    • getOidc

      public SaOAuth2OidcConfig getOidc()
      获取 oidc 相关配置
      返回:
      oidc 相关配置
    • setOidc

      设置 oidc 相关配置
      参数:
      oidc - /
      返回:
      /
    • getClients

      public Map<String,SaClientModel> getClients()
      获取 client 列表
      返回:
      /
    • setClients

      public SaOAuth2ServerConfig setClients(Map<String,SaClientModel> clients)
      写入 client 列表
      返回:
      /
    • toString

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

      public SaOAuth2ServerConfig addClient(SaClientModel client)
      注册 client
      返回:
      /