Class JpaOAuth2AuthorizationService

java.lang.Object
cn.herodotus.engine.oauth2.data.jpa.storage.JpaOAuth2AuthorizationService
All Implemented Interfaces:
org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService

public class JpaOAuth2AuthorizationService extends Object implements org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService

Description: 基于 JPA 的 OAuth2 认证服务

Author:
: gengwei.zheng
Date:
: 2022/2/25 22:16
  • Constructor Summary

    Constructors
    Constructor
    Description
    JpaOAuth2AuthorizationService(HerodotusAuthorizationService herodotusAuthorizationService, org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    findAuthorizationCount(String registeredClientId, String principalName)
     
    List<org.springframework.security.oauth2.server.authorization.OAuth2Authorization>
    findAvailableAuthorizations(String registeredClientId, String principalName)
     
    org.springframework.security.oauth2.server.authorization.OAuth2Authorization
     
    org.springframework.security.oauth2.server.authorization.OAuth2Authorization
    findByToken(String token, org.springframework.security.oauth2.server.authorization.OAuth2TokenType tokenType)
     
    void
    remove(org.springframework.security.oauth2.server.authorization.OAuth2Authorization authorization)
     
    void
    save(org.springframework.security.oauth2.server.authorization.OAuth2Authorization authorization)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JpaOAuth2AuthorizationService

      public JpaOAuth2AuthorizationService(HerodotusAuthorizationService herodotusAuthorizationService, org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository registeredClientRepository)
  • Method Details

    • save

      public void save(org.springframework.security.oauth2.server.authorization.OAuth2Authorization authorization)
      Specified by:
      save in interface org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService
    • remove

      @Transactional public void remove(org.springframework.security.oauth2.server.authorization.OAuth2Authorization authorization)
      Specified by:
      remove in interface org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService
    • findById

      public org.springframework.security.oauth2.server.authorization.OAuth2Authorization findById(String id)
      Specified by:
      findById in interface org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService
    • findAuthorizationCount

      public int findAuthorizationCount(String registeredClientId, String principalName)
    • findAvailableAuthorizations

      public List<org.springframework.security.oauth2.server.authorization.OAuth2Authorization> findAvailableAuthorizations(String registeredClientId, String principalName)
    • findByToken

      public org.springframework.security.oauth2.server.authorization.OAuth2Authorization findByToken(String token, org.springframework.security.oauth2.server.authorization.OAuth2TokenType tokenType)
      Specified by:
      findByToken in interface org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationService