Class ClientService


  • @ApplicationScoped
    public class ClientService
    extends java.lang.Object
    Provides operations with clients.
    Version:
    October 22, 2016
    Author:
    Javier Rojas Blum, Yuriy Movchan Date: 04/15/2014
    • Field Detail

      • CLIENT_OBJECT_CLASSES

        public static final java.lang.String[] CLIENT_OBJECT_CLASSES
    • Constructor Detail

      • ClientService

        public ClientService()
    • Method Detail

      • persist

        public void persist​(Client client)
      • merge

        public void merge​(Client client)
      • authenticate

        public boolean authenticate​(java.lang.String clientId,
                                    java.lang.String password)
        Authenticate client.
        Parameters:
        clientId - Client inum.
        password - Client password.
        Returns:
        true if success, otherwise false.
      • getClient

        public java.util.Set<Client> getClient​(java.util.Collection<java.lang.String> clientIds,
                                               boolean silent)
      • getClient

        public Client getClient​(java.lang.String clientId)
      • isPublic

        public boolean isPublic​(java.lang.String clientId)
      • isPublic

        public boolean isPublic​(Client client)
      • getClient

        public Client getClient​(java.lang.String clientId,
                                java.lang.String registrationAccessToken)
      • getClientsByDns

        public java.util.Set<Client> getClientsByDns​(java.util.Collection<java.lang.String> dnList)
      • getClientsByDns

        public java.util.Set<Client> getClientsByDns​(java.util.Collection<java.lang.String> dnList,
                                                     boolean silently)
      • getClientByDn

        public Client getClientByDn​(java.lang.String dn)
        Returns client by DN.
        Parameters:
        dn - dn of client
        Returns:
        Client
      • getCustomAttribute

        public org.gluu.persist.model.base.CustomAttribute getCustomAttribute​(Client client,
                                                                              java.lang.String attributeName)
      • setCustomAttribute

        public void setCustomAttribute​(Client client,
                                       java.lang.String attributeName,
                                       java.lang.String attributeValue)
      • getAllClients

        public java.util.List<Client> getAllClients​(java.lang.String[] returnAttributes)
      • getAllClients

        public java.util.List<Client> getAllClients​(java.lang.String[] returnAttributes,
                                                    int size)
      • buildClientDn

        public java.lang.String buildClientDn​(java.lang.String p_clientId)
      • remove

        public void remove​(Client client)
      • updateAccessTime

        public void updateAccessTime​(Client client,
                                     boolean isUpdateLogonTime)
      • decryptSecret

        public java.lang.String decryptSecret​(java.lang.String encryptedClientSecret)
                                       throws org.gluu.util.security.StringEncrypter.EncryptionException
        Throws:
        org.gluu.util.security.StringEncrypter.EncryptionException
      • encryptSecret

        public java.lang.String encryptSecret​(java.lang.String clientSecret)
                                       throws org.gluu.util.security.StringEncrypter.EncryptionException
        Throws:
        org.gluu.util.security.StringEncrypter.EncryptionException