Interface OAuthClientService

  • All Superinterfaces:
    org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository
    All Known Implementing Classes:
    OAuthServiceImpl

    public interface OAuthClientService
    extends org.springframework.security.oauth2.server.authorization.client.RegisteredClientRepository
    The Interface OAuthClientDetailsService.
    • Method Detail

      • listClientDetails

        List<OAuthClient> listClientDetails()
        List client details.
        Returns:
        the list
      • listClientDetails

        org.springframework.data.domain.Page<OAuthClient> listClientDetails​(org.springframework.data.domain.Pageable pageable)
        List client details.
        Parameters:
        pageable - the pageable
        Returns:
        page with Client details
      • listClientDetails

        org.springframework.data.domain.Page<OAuthClient> listClientDetails​(com.querydsl.core.types.Predicate predicate,
                                                                            org.springframework.data.domain.Pageable pageable)
        List client details with filtering by predicate.
        Parameters:
        predicate - the predicate
        pageable - the pageable
        Returns:
        page with Client details
      • getClient

        OAuthClient getClient​(String clientId)
        Gets the client.
        Parameters:
        clientId - the client id
        Returns:
        the client
      • addClient

        OAuthClient addClient​(OAuthClient client)
        Register a new OAuth client.
        Parameters:
        client - the client
        Returns:
        the OAuth client
        Since:
        1.3
      • updateClient

        OAuthClient updateClient​(long id,
                                 int version,
                                 OAuthClient updates)
        Update client.
        Parameters:
        id - the id
        version - the version
        updates - the updates
        Returns:
        the o auth client
      • updateClientId

        OAuthClient updateClientId​(String sourceId,
                                   String targetId)
        Update clientId.
        Parameters:
        sourceId - the source clientId
        targetId - the target clientId
        Returns:
        the o auth client
      • removeClient

        OAuthClient removeClient​(OAuthClient oauthClient)
        Removes the client.
        Parameters:
        oauthClient - the oauth client
        Returns:
        the o auth client
      • autocompleteClients

        List<OAuthClient> autocompleteClients​(String title,
                                              int limit)
        Autocomplete OAuth clients by title.
        Parameters:
        title - the title
        limit - maximum number of results
        Returns:
        list of auth clients
      • resetSecret

        String resetSecret​(OAuthClient oauthClient)
        Generates a new clientSecret.
        Parameters:
        oauthClient - the client to regenerate secret for
        Returns:
        the new client secret
      • setSecret

        String setSecret​(OAuthClient oauthClient,
                         String clientSecret)
        Sets a new clientSecret.
        Parameters:
        oauthClient - the client to set a secret for
        clientSecret - the client secret
        Returns:
        the new client secret
      • removeSecret

        OAuthClient removeSecret​(OAuthClient oauthClient)
        Removes the Client secret.
        Parameters:
        oauthClient - the oauth client
        Returns:
        Updated OAuth client
      • isOriginRegistered

        boolean isOriginRegistered​(String origin)
        Check if the origin is registered with one of the clients
        Parameters:
        origin - the origin
        Returns:
        true if a client exists with this origin, false otherwise