Interface OAuthTokenDao
-
- All Superinterfaces:
Dao
- All Known Implementing Classes:
DefaultOAuthTokenDao
public interface OAuthTokenDao extends Dao
Dao forOAuthAccessTokenModelandOAuthRefreshTokenModelaccess.- Spring Bean ID:
- oauthTokenDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OAuthAccessTokenModelfindAccessTokenByAuthenticationId(java.lang.String authenticationId)Finds access token by authentication identifier (key)OAuthAccessTokenModelfindAccessTokenById(java.lang.String id)Finds access token by given identifier (key)OAuthAccessTokenModelfindAccessTokenByRefreshTokenId(java.lang.String refreshTokenId)Finds access token by identifier of the refresh tokenjava.util.List<OAuthAccessTokenModel>findAccessTokenListByRefreshTokenId(java.lang.String refreshTokenId)Finds access tokens related to refresh token with given identifierjava.util.List<OAuthAccessTokenModel>findAccessTokenListForClient(java.lang.String clientId)Finds access tokens for clientjava.util.List<OAuthAccessTokenModel>findAccessTokenListForClientAndUser(java.lang.String clientId, java.lang.String userName)Finds access tokens based on client identifier and user name;java.util.List<OAuthAccessTokenModel>findAccessTokenListForUser(java.lang.String userName)Finds access tokens for user with given user nameOAuthRefreshTokenModelfindRefreshTokenById(java.lang.String id)Finds refresh token by given identifier (key)
-
-
-
Method Detail
-
findAccessTokenById
OAuthAccessTokenModel findAccessTokenById(java.lang.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(java.lang.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(java.lang.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 existAmbiguousIdentifierException- if there is multiple access token related to refresh token
-
findAccessTokenByAuthenticationId
OAuthAccessTokenModel findAccessTokenByAuthenticationId(java.lang.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 authenticationAmbiguousIdentifierException- if there is multiple access token related to given authentication
-
findAccessTokenListByRefreshTokenId
java.util.List<OAuthAccessTokenModel> findAccessTokenListByRefreshTokenId(java.lang.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
java.util.List<OAuthAccessTokenModel> findAccessTokenListForClient(java.lang.String clientId)
Finds access tokens for client- Parameters:
clientId- client identifier- Returns:
- list of access tokens for client or empty list
-
findAccessTokenListForUser
java.util.List<OAuthAccessTokenModel> findAccessTokenListForUser(java.lang.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
java.util.List<OAuthAccessTokenModel> findAccessTokenListForClientAndUser(java.lang.String clientId, java.lang.String userName)
Finds access tokens based on client identifier and user name;- Parameters:
clientId- client identifieruserName- user name- Returns:
- list of access tokens or empty list
-
-