Interface OAuthTokenDao
- All Superinterfaces:
Dao
- All Known Implementing Classes:
DefaultOAuthTokenDao
Dao for
OAuthAccessTokenModel and OAuthRefreshTokenModel access.- Spring Bean ID:
- oauthTokenDao
-
Method Summary
Modifier and TypeMethodDescriptionfindAccessTokenByAuthenticationId(String authenticationId) Finds access token by authentication identifier (key)Finds access token by given identifier (key)findAccessTokenByRefreshTokenId(String refreshTokenId) Finds access token by identifier of the refresh tokenfindAccessTokenListByRefreshTokenId(String refreshTokenId) Finds access tokens related to refresh token with given identifierfindAccessTokenListForClient(String clientId) Finds access tokens for clientfindAccessTokenListForClientAndUser(String clientId, String userName) Finds access tokens based on client identifier and user name;findAccessTokenListForUser(String userName) Finds access tokens for user with given user nameFinds refresh token by given identifier (key)
-
Method Details
-
findAccessTokenById
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
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
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
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
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
Finds access tokens for client- Parameters:
clientId- client identifier- Returns:
- list of access tokens for client or empty list
-
findAccessTokenListForUser
Finds access tokens for user with given user name- Parameters:
userName- user name- Returns:
- list of access tokens for user or empty list
-
findAccessTokenListForClientAndUser
Finds access tokens based on client identifier and user name;- Parameters:
clientId- client identifieruserName- user name- Returns:
- list of access tokens or empty list
-