Class OAuth2DeviceService
java.lang.Object
cn.herodotus.engine.data.core.jpa.service.AbstractJpaService<OAuth2Device,String>
cn.herodotus.engine.logic.identity.service.OAuth2DeviceService
- All Implemented Interfaces:
cn.herodotus.engine.data.core.jpa.service.BaseJpaReadableService<OAuth2Device,,String> cn.herodotus.engine.data.core.jpa.service.BaseJpaWriteableService<OAuth2Device,,String> cn.herodotus.engine.data.core.service.BasePageService<OAuth2Device,,String> cn.herodotus.engine.data.core.service.BaseService<OAuth2Device,String>
@Service
public class OAuth2DeviceService
extends cn.herodotus.engine.data.core.jpa.service.AbstractJpaService<OAuth2Device,String>
Description: OAuth2DeviceService
- Author:
- : gengwei.zheng
- Date:
- : 2023/5/15 16:36
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2DeviceService(org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository, HerodotusRegisteredClientRepository herodotusRegisteredClientRepository, OAuth2DeviceRepository deviceRepository, OAuth2ScopeService scopeService) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoiddeleteById(String id) cn.herodotus.engine.data.core.jpa.repository.BaseJpaRepository<OAuth2Device,String> saveAndFlush(OAuth2Device entity) booleansync(org.springframework.security.oauth2.server.authorization.oidc.OidcClientRegistration oidcClientRegistration) 客户端自动注册是将信息存储在 oauth2_registered_client 中。Methods inherited from class cn.herodotus.engine.data.core.jpa.service.AbstractJpaService
likeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cn.herodotus.engine.data.core.jpa.service.BaseJpaReadableService
count, count, exists, existsById, findAll, findAll, findAll, findAll, findAllById, findById, findByPage, findByPage, findByPage, findByPage, getReferenceByIdMethods inherited from interface cn.herodotus.engine.data.core.jpa.service.BaseJpaWriteableService
delete, deleteAll, deleteAll, deleteAllById, deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, flush, save, saveAll, saveAllAndFlushMethods inherited from interface cn.herodotus.engine.data.core.service.BasePageService
findByPage, findByPage, findByPage
-
Constructor Details
-
OAuth2DeviceService
public OAuth2DeviceService(org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository, HerodotusRegisteredClientRepository herodotusRegisteredClientRepository, OAuth2DeviceRepository deviceRepository, OAuth2ScopeService scopeService)
-
-
Method Details
-
getRepository
public cn.herodotus.engine.data.core.jpa.repository.BaseJpaRepository<OAuth2Device,String> getRepository() -
saveAndFlush
@Transactional(rollbackFor=cn.herodotus.engine.core.foundation.exception.transaction.TransactionalRollbackException.class) public OAuth2Device saveAndFlush(OAuth2Device entity) -
deleteById
@Transactional(rollbackFor=cn.herodotus.engine.core.foundation.exception.transaction.TransactionalRollbackException.class) public void deleteById(String id) -
authorize
@Transactional(rollbackFor=cn.herodotus.engine.core.foundation.exception.transaction.TransactionalRollbackException.class) public OAuth2Device authorize(String deviceId, String[] scopeIds) -
sync
public boolean sync(org.springframework.security.oauth2.server.authorization.oidc.OidcClientRegistration oidcClientRegistration) 客户端自动注册是将信息存储在 oauth2_registered_client 中。 为了方便管理,将该条数据同步至 oauth2_device 表中。- Parameters:
oidcClientRegistration-OidcClientRegistration- Returns:
- 是否同步成功
-
activate
-