Package io.jans.as.server.service
Class ClientService
- java.lang.Object
-
- io.jans.as.server.service.ClientService
-
@Named public class ClientService extends 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 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(String clientId, String password)
Authenticate client.String
buildClientDn(String clientId)
String
decryptSecret(String encryptedClientSecret)
String
encryptSecret(String clientSecret)
String
generateRegistrationAccessToken()
List<io.jans.as.common.model.registration.Client>
getAllClients(String[] returnAttributes)
List<io.jans.as.common.model.registration.Client>
getAllClients(String[] returnAttributes, int size)
Object
getAttribute(io.jans.as.common.model.registration.Client client, String clientAttribute)
io.jans.as.common.model.registration.Client
getClient(String clientId)
io.jans.as.common.model.registration.Client
getClient(String clientId, String registrationAccessToken)
Set<io.jans.as.common.model.registration.Client>
getClient(Collection<String> clientIds, boolean silent)
io.jans.as.common.model.registration.Client
getClientByDn(String dn)
Returns client by DN.Set<io.jans.as.common.model.registration.Client>
getClientsByDns(Collection<String> dnList)
Set<io.jans.as.common.model.registration.Client>
getClientsByDns(Collection<String> dnList, boolean silently)
io.jans.orm.model.base.CustomObjectAttribute
getCustomAttribute(io.jans.as.common.model.registration.Client client, String attributeName)
boolean
isPublic(io.jans.as.common.model.registration.Client client)
boolean
isPublic(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
removeFromCache(io.jans.as.common.model.registration.Client client)
void
rotateRegistrationAccessToken(io.jans.as.common.model.registration.Client client)
void
setCustomAttribute(io.jans.as.common.model.registration.Client client, String attributeName, String attributeValue)
void
updateAccessTime(io.jans.as.common.model.registration.Client client, boolean isUpdateLogonTime)
-
-
-
Field Detail
-
CLIENT_OBJECT_CLASSES
protected static final String[] CLIENT_OBJECT_CLASSES
-
-
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(String clientId, String password)
Authenticate client.- Parameters:
clientId
- Client inum.password
- Client password.- Returns:
true
if success, otherwisefalse
.
-
getClient
public Set<io.jans.as.common.model.registration.Client> getClient(Collection<String> clientIds, boolean silent)
-
getClient
public io.jans.as.common.model.registration.Client getClient(String clientId)
-
isPublic
public boolean isPublic(String clientId)
-
isPublic
public boolean isPublic(io.jans.as.common.model.registration.Client client)
-
getClient
public io.jans.as.common.model.registration.Client getClient(String clientId, String registrationAccessToken)
-
generateRegistrationAccessToken
public String generateRegistrationAccessToken()
-
rotateRegistrationAccessToken
public void rotateRegistrationAccessToken(io.jans.as.common.model.registration.Client client)
-
getClientsByDns
public Set<io.jans.as.common.model.registration.Client> getClientsByDns(Collection<String> dnList)
-
getClientsByDns
public Set<io.jans.as.common.model.registration.Client> getClientsByDns(Collection<String> dnList, boolean silently)
-
getClientByDn
public io.jans.as.common.model.registration.Client getClientByDn(String dn)
Returns client by DN.- Parameters:
dn
- dn of client- Returns:
- Client
-
getCustomAttribute
public io.jans.orm.model.base.CustomObjectAttribute getCustomAttribute(io.jans.as.common.model.registration.Client client, String attributeName)
-
setCustomAttribute
public void setCustomAttribute(io.jans.as.common.model.registration.Client client, String attributeName, String attributeValue)
-
getAllClients
public List<io.jans.as.common.model.registration.Client> getAllClients(String[] returnAttributes)
-
getAllClients
public List<io.jans.as.common.model.registration.Client> getAllClients(String[] returnAttributes, int size)
-
remove
public void remove(io.jans.as.common.model.registration.Client client)
-
removeFromCache
public void removeFromCache(io.jans.as.common.model.registration.Client client)
-
updateAccessTime
public void updateAccessTime(io.jans.as.common.model.registration.Client client, boolean isUpdateLogonTime)
-
getAttribute
public Object getAttribute(io.jans.as.common.model.registration.Client client, String clientAttribute)
-
decryptSecret
public String decryptSecret(String encryptedClientSecret) throws io.jans.util.security.StringEncrypter.EncryptionException
- Throws:
io.jans.util.security.StringEncrypter.EncryptionException
-
-