クラス RemoteOAuthAccessTokenStore

java.lang.Object
org.iplass.mtp.impl.auth.oauth.token.remote.RemoteOAuthAccessTokenStore
すべての実装されたインタフェース:
OAuthAccessTokenStore, org.iplass.mtp.spi.ServiceInitListener<OAuthAuthorizationService>

public class RemoteOAuthAccessTokenStore extends Object implements OAuthAccessTokenStore, org.iplass.mtp.spi.ServiceInitListener<OAuthAuthorizationService>
バックエンドでOAuth 2.0 Token Introspection (RFC7662)を呼び出すTokenStore。 AuthorizationServerとは別インスタンスのResourceServerでの利用想定。 読み取り専用。
  • コンストラクタの詳細

    • RemoteOAuthAccessTokenStore

      public RemoteOAuthAccessTokenStore()
  • メソッドの詳細

    • getAuthenticationMethod

      public ClientAuthenticationMethod getAuthenticationMethod()
      戻り値:
      Introspection EndpointのClient(Resource Server)認証方式
    • setAuthenticationMethod

      public void setAuthenticationMethod(ClientAuthenticationMethod authenticationMethod)
      パラメータ:
      authenticationMethod - Introspection EndpointのClient(Resource Server)認証方式
    • getHttpClientConfig

      public org.iplass.mtp.impl.http.HttpClientConfig getHttpClientConfig()
      戻り値:
      HttpClientConfig
    • setHttpClientConfig

      public void setHttpClientConfig(org.iplass.mtp.impl.http.HttpClientConfig httpClientConfig)
      パラメータ:
      httpClientConfig - HttpClientConfig
    • getExponentialBackoff

      public org.iplass.mtp.impl.http.ExponentialBackoff getExponentialBackoff()
      戻り値:
      リトライ処理する際の 指数バックオフ
    • setExponentialBackoff

      public void setExponentialBackoff(org.iplass.mtp.impl.http.ExponentialBackoff exponentialBackoff)
      パラメータ:
      exponentialBackoff - リトライ処理する際の 指数バックオフ
    • getTenantValidationType

      public TenantValidationType getTenantValidationType()
      戻り値:
      テナントの検証方式
    • setTenantValidationType

      public void setTenantValidationType(TenantValidationType tenantValidationType)
      パラメータ:
      tenantValidationType - テナントの検証方式
    • getIntrospectionEndpointUrl

      public String getIntrospectionEndpointUrl()
      戻り値:
      Introspection EndpointのURL
    • setIntrospectionEndpointUrl

      public void setIntrospectionEndpointUrl(String introspectionEndpointUrl)
      パラメータ:
      introspectionEndpointUrl - Introspection EndpointのURL
    • getResourceServerId

      public String getResourceServerId()
      戻り値:
      Authorization Serverから発行されるResource ServerのID
    • setResourceServerId

      public void setResourceServerId(String resourceServerId)
      パラメータ:
      resourceServerId - Authorization Serverから発行されるResource ServerのID
    • getResourceServerSecret

      public String getResourceServerSecret()
      戻り値:
      Authorization Serverから発行されるResource ServerのSecret
    • setResourceServerSecret

      public void setResourceServerSecret(String resourceServerSecret)
      パラメータ:
      resourceServerSecret - Authorization Serverから発行されるResource ServerのSecret
    • isReloadUser

      public boolean isReloadUser()
      AccessTokenに紐づくユーザー情報の取得方法の制御

      trueの場合
      レスポンスの sub の値をoidとみなし、Resource Server上からUserエンティティを検索します。Userが存在しない場合、許可しません。

      falseの場合
      レスポンスからユーザー情報を取得します。 レスポンスに resource_owner でUserエンティティのJSON表現が格納されていた場合、それを利用します。 resource_owner に格納されていなかった場合、 sub の値をoid、accountIdとし、 username の値をnameとしてユーザー情報とします。

      戻り値:
      AccessTokenに紐づくユーザー情報の取得方法の制御
    • setReloadUser

      public void setReloadUser(boolean reloadUser)
      パラメータ:
      reloadUser - AccessTokenに紐づくユーザー情報の取得方法の制御
    • getAccessToken

      public AccessToken getAccessToken(String tokenString)
      定義:
      getAccessToken インタフェース内 OAuthAccessTokenStore
    • inited

      public void inited(OAuthAuthorizationService service, org.iplass.mtp.spi.Config config)
      定義:
      inited インタフェース内 org.iplass.mtp.spi.ServiceInitListener<OAuthAuthorizationService>
    • destroyed

      public void destroyed()
      定義:
      destroyed インタフェース内 org.iplass.mtp.spi.ServiceInitListener<OAuthAuthorizationService>
    • createAccessToken

      public AccessToken createAccessToken(MetaOAuthClient.OAuthClientRuntime client, String resourceOwnerId, List<String> scopes)
      定義:
      createAccessToken インタフェース内 OAuthAccessTokenStore
    • createAccessToken

      public AccessToken createAccessToken(MetaOAuthClient.OAuthClientRuntime client, RefreshToken refreshToken)
      定義:
      createAccessToken インタフェース内 OAuthAccessTokenStore
    • getAccessTokenByUserOid

      public AccessToken getAccessTokenByUserOid(MetaOAuthClient.OAuthClientRuntime client, String userOid)
      定義:
      getAccessTokenByUserOid インタフェース内 OAuthAccessTokenStore
    • getRefreshToken

      public RefreshToken getRefreshToken(String tokenString)
      定義:
      getRefreshToken インタフェース内 OAuthAccessTokenStore
    • revokeToken

      public void revokeToken(MetaOAuthClient.OAuthClientRuntime client, String tokenString, String tokenTypeHint)
      定義:
      revokeToken インタフェース内 OAuthAccessTokenStore
    • revokeTokenByUserOid

      public void revokeTokenByUserOid(String userOid)
      定義:
      revokeTokenByUserOid インタフェース内 OAuthAccessTokenStore