@Service(value="defaultApprovedSiteService") public class DefaultApprovedSiteService extends Object implements ApprovedSiteService
Constructor and Description |
---|
DefaultApprovedSiteService() |
Modifier and Type | Method and Description |
---|---|
void |
clearApprovedSitesForClient(org.springframework.security.oauth2.provider.ClientDetails client)
Clear out any approved sites for a given client.
|
void |
clearExpiredSites()
Remove all expired approved sites fromt he data store.
|
ApprovedSite |
createApprovedSite(String clientId,
String userId,
Date timeoutDate,
Set<String> allowedScopes) |
Collection<ApprovedSite> |
getAll()
Return a collection of all ApprovedSites
|
List<OAuth2AccessTokenEntity> |
getApprovedAccessTokens(ApprovedSite approvedSite)
Return all approved access tokens for the site.
|
Collection<ApprovedSite> |
getByClientId(String clientId)
Get all sites associated with this client
|
Collection<ApprovedSite> |
getByClientIdAndUserId(String clientId,
String userId)
Return a collection of ApprovedSite managed by this repository matching the
provided client ID and user ID
|
ApprovedSite |
getById(Long id)
Get ApprovedSite for id
|
Collection<ApprovedSite> |
getByUserId(String userId)
Get all sites approved by this user
|
void |
remove(ApprovedSite approvedSite)
Remove the ApprovedSite
|
ApprovedSite |
save(ApprovedSite approvedSite)
Save an ApprovedSite
|
public DefaultApprovedSiteService()
public Collection<ApprovedSite> getAll()
ApprovedSiteService
getAll
in interface ApprovedSiteService
@Transactional(value="defaultTransactionManager") public ApprovedSite save(ApprovedSite approvedSite)
ApprovedSiteService
save
in interface ApprovedSiteService
approvedSite
- the ApprovedSite to be savedpublic ApprovedSite getById(Long id)
ApprovedSiteService
getById
in interface ApprovedSiteService
id
- id for ApprovedSite@Transactional(value="defaultTransactionManager") public void remove(ApprovedSite approvedSite)
ApprovedSiteService
remove
in interface ApprovedSiteService
approvedSite
- the ApprovedSite to remove@Transactional(value="defaultTransactionManager") public ApprovedSite createApprovedSite(String clientId, String userId, Date timeoutDate, Set<String> allowedScopes)
createApprovedSite
in interface ApprovedSiteService
public Collection<ApprovedSite> getByClientIdAndUserId(String clientId, String userId)
ApprovedSiteService
getByClientIdAndUserId
in interface ApprovedSiteService
public Collection<ApprovedSite> getByUserId(String userId)
ApprovedSiteService
getByUserId
in interface ApprovedSiteService
userId
- ApprovedSiteRepository.getByUserId(java.lang.String)
public Collection<ApprovedSite> getByClientId(String clientId)
ApprovedSiteService
getByClientId
in interface ApprovedSiteService
clientId
- ApprovedSiteRepository.getByClientId(java.lang.String)
public void clearApprovedSitesForClient(org.springframework.security.oauth2.provider.ClientDetails client)
ApprovedSiteService
clearApprovedSitesForClient
in interface ApprovedSiteService
public void clearExpiredSites()
ApprovedSiteService
clearExpiredSites
in interface ApprovedSiteService
public List<OAuth2AccessTokenEntity> getApprovedAccessTokens(ApprovedSite approvedSite)
ApprovedSiteService
getApprovedAccessTokens
in interface ApprovedSiteService
Copyright © 2018. All rights reserved.