Package io.jans.as.server.service
Class ClientService
- java.lang.Object
-
- io.jans.as.server.service.ClientService
-
@Named 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 Summary
Fields Modifier and Type Field Description protected static java.lang.String[]
CLIENT_OBJECT_CLASSES
-
Constructor Summary
Constructors Constructor Description ClientService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
authenticate(java.lang.String clientId, java.lang.String password)
Authenticate client.java.lang.String
buildClientDn(java.lang.String clientId)
java.lang.String
decryptSecret(java.lang.String encryptedClientSecret)
java.lang.String
encryptSecret(java.lang.String clientSecret)
java.util.List<io.jans.as.common.model.registration.Client>
getAllClients(java.lang.String[] returnAttributes)
java.util.List<io.jans.as.common.model.registration.Client>
getAllClients(java.lang.String[] returnAttributes, int size)
java.lang.Object
getAttribute(io.jans.as.common.model.registration.Client client, java.lang.String clientAttribute)
io.jans.as.common.model.registration.Client
getClient(java.lang.String clientId)
io.jans.as.common.model.registration.Client
getClient(java.lang.String clientId, java.lang.String registrationAccessToken)
java.util.Set<io.jans.as.common.model.registration.Client>
getClient(java.util.Collection<java.lang.String> clientIds, boolean silent)
io.jans.as.common.model.registration.Client
getClientByDn(java.lang.String dn)
Returns client by DN.java.util.Set<io.jans.as.common.model.registration.Client>
getClientsByDns(java.util.Collection<java.lang.String> dnList)
java.util.Set<io.jans.as.common.model.registration.Client>
getClientsByDns(java.util.Collection<java.lang.String> dnList, boolean silently)
io.jans.orm.model.base.CustomAttribute
getCustomAttribute(io.jans.as.common.model.registration.Client client, java.lang.String attributeName)
boolean
isPublic(io.jans.as.common.model.registration.Client client)
boolean
isPublic(java.lang.String clientId)
void
merge(io.jans.as.common.model.registration.Client client)
void
persist(io.jans.as.common.model.registration.Client client)
void
remove(io.jans.as.common.model.registration.Client client)
void
setCustomAttribute(io.jans.as.common.model.registration.Client client, java.lang.String attributeName, java.lang.String attributeValue)
void
updateAccessTime(io.jans.as.common.model.registration.Client client, boolean isUpdateLogonTime)
-
-
-
Method Detail
-
persist
public void persist(io.jans.as.common.model.registration.Client client)
-
merge
public void merge(io.jans.as.common.model.registration.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, otherwisefalse
.
-
getClient
public java.util.Set<io.jans.as.common.model.registration.Client> getClient(java.util.Collection<java.lang.String> clientIds, boolean silent)
-
getClient
public io.jans.as.common.model.registration.Client getClient(java.lang.String clientId)
-
isPublic
public boolean isPublic(java.lang.String clientId)
-
isPublic
public boolean isPublic(io.jans.as.common.model.registration.Client client)
-
getClient
public io.jans.as.common.model.registration.Client getClient(java.lang.String clientId, java.lang.String registrationAccessToken)
-
getClientsByDns
public java.util.Set<io.jans.as.common.model.registration.Client> getClientsByDns(java.util.Collection<java.lang.String> dnList)
-
getClientsByDns
public java.util.Set<io.jans.as.common.model.registration.Client> getClientsByDns(java.util.Collection<java.lang.String> dnList, boolean silently)
-
getClientByDn
public io.jans.as.common.model.registration.Client getClientByDn(java.lang.String dn)
Returns client by DN.- Parameters:
dn
- dn of client- Returns:
- Client
-
getCustomAttribute
public io.jans.orm.model.base.CustomAttribute getCustomAttribute(io.jans.as.common.model.registration.Client client, java.lang.String attributeName)
-
setCustomAttribute
public void setCustomAttribute(io.jans.as.common.model.registration.Client client, java.lang.String attributeName, java.lang.String attributeValue)
-
getAllClients
public java.util.List<io.jans.as.common.model.registration.Client> getAllClients(java.lang.String[] returnAttributes)
-
getAllClients
public java.util.List<io.jans.as.common.model.registration.Client> getAllClients(java.lang.String[] returnAttributes, int size)
-
buildClientDn
public java.lang.String buildClientDn(java.lang.String clientId)
-
remove
public void remove(io.jans.as.common.model.registration.Client client)
-
updateAccessTime
public void updateAccessTime(io.jans.as.common.model.registration.Client client, boolean isUpdateLogonTime)
-
getAttribute
public java.lang.Object getAttribute(io.jans.as.common.model.registration.Client client, java.lang.String clientAttribute)
-
decryptSecret
public java.lang.String decryptSecret(java.lang.String encryptedClientSecret) throws io.jans.util.security.StringEncrypter.EncryptionException
- Throws:
io.jans.util.security.StringEncrypter.EncryptionException
-
encryptSecret
public java.lang.String encryptSecret(java.lang.String clientSecret) throws io.jans.util.security.StringEncrypter.EncryptionException
- Throws:
io.jans.util.security.StringEncrypter.EncryptionException
-
-