All Superinterfaces:
Dao
All Known Implementing Classes:
DefaultOAuthTokenDao

public interface OAuthTokenDao extends Dao
Spring Bean ID:
oauthTokenDao
  • Method Details

    • findAccessTokenById

      OAuthAccessTokenModel findAccessTokenById(String id)
      Finds access token by given identifier (key)
      Parameters:
      id - token identifier
      Returns:
      access token with given id
      Throws:
      ModelNotFoundException - if access token with given id doesn't exist
    • findRefreshTokenById

      OAuthRefreshTokenModel findRefreshTokenById(String id)
      Finds refresh token by given identifier (key)
      Parameters:
      id - refresh token identifier
      Returns:
      refresh token with given id
      Throws:
      ModelNotFoundException - if refresh token with given id doesn't exist
    • findAccessTokenByRefreshTokenId

      OAuthAccessTokenModel findAccessTokenByRefreshTokenId(String refreshTokenId)
      Finds access token by identifier of the refresh token
      Parameters:
      refreshTokenId - refresh token identifier
      Returns:
      access token
      Throws:
      ModelNotFoundException - if there is no access token related to refresh token or refresh token with given identifier doesn't exist
      AmbiguousIdentifierException - if there is multiple access token related to refresh token
    • findAccessTokenByAuthenticationId

      OAuthAccessTokenModel findAccessTokenByAuthenticationId(String authenticationId)
      Finds access token by authentication identifier (key)
      Parameters:
      authenticationId - authentication identifier
      Returns:
      access token
      Throws:
      ModelNotFoundException - if there is no access token related to given authentication
      AmbiguousIdentifierException - if there is multiple access token related to given authentication
    • findAccessTokenListByRefreshTokenId

      List<OAuthAccessTokenModel> findAccessTokenListByRefreshTokenId(String refreshTokenId)
      Finds access tokens related to refresh token with given identifier
      Parameters:
      refreshTokenId - - refresh token identifier
      Returns:
      list of access tokens related to refresh token or empty list
    • findAccessTokenListForClient

      List<OAuthAccessTokenModel> findAccessTokenListForClient(String clientId)
      Finds access tokens for client
      Parameters:
      clientId - client identifier
      Returns:
      list of access tokens for client or empty list
    • findAccessTokenListForUser

      List<OAuthAccessTokenModel> findAccessTokenListForUser(String userName)
      Finds access tokens for user with given user name
      Parameters:
      userName - user name
      Returns:
      list of access tokens for user or empty list
    • findAccessTokenListForClientAndUser

      List<OAuthAccessTokenModel> findAccessTokenListForClientAndUser(String clientId, String userName)
      Finds access tokens based on client identifier and user name;
      Parameters:
      clientId - client identifier
      userName - user name
      Returns:
      list of access tokens or empty list