Package io.jans.as.server.service
Class GrantService
- java.lang.Object
-
- io.jans.as.server.service.GrantService
-
@ApplicationScoped public class GrantService extends Object
- Version:
- November 28, 2018
- Author:
- Yuriy Zabrovarnyy, Javier Rojas Blum
-
-
Constructor Summary
Constructors Constructor Description GrantService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
buildDn(String hashedToken)
void
filterOutRefreshTokenFromDeletion(List<io.jans.model.token.TokenEntity> tokens)
static String
generateGrantId()
io.jans.model.token.TokenEntity
getGrantByCode(String code)
io.jans.model.token.TokenEntity
getGrantByReferenceId(String referenceId)
List<io.jans.model.token.TokenEntity>
getGrantsByAuthorizationCode(String authorizationCode)
List<io.jans.model.token.TokenEntity>
getGrantsByGrantId(String grantId)
List<io.jans.model.token.TokenEntity>
getGrantsBySessionDn(String sessionDn)
List<io.jans.model.token.TokenEntity>
getGrantsByUserDn(String userDn)
List<io.jans.model.token.TokenEntity>
getGrantsOfClient(String clientId)
void
logout(String sessionDn)
void
merge(io.jans.model.token.TokenEntity token)
void
mergeSilently(io.jans.model.token.TokenEntity token)
void
persist(io.jans.model.token.TokenEntity token)
protected void
publishIdTokenLockMessage(io.jans.model.token.TokenEntity token, String opearation)
void
remove(AuthorizationGrant grant)
void
remove(io.jans.model.token.TokenEntity token)
void
remove(List<io.jans.model.token.TokenEntity> entries)
void
removeAllByAuthorizationCode(String authorizationCode)
void
removeAllByGrantId(String grantId)
void
removeAllTokensBySession(String sessionDn)
void
removeAuthorizationCode(String code)
void
removeByCode(String code)
Removes grant with particular code.void
removeSilently(io.jans.model.token.TokenEntity token)
void
removeSilently(List<io.jans.model.token.TokenEntity> entries)
boolean
shouldPersist()
boolean
shouldSaveInCache()
-
-
-
Method Detail
-
generateGrantId
public static String generateGrantId()
-
merge
public void merge(io.jans.model.token.TokenEntity token)
-
mergeSilently
public void mergeSilently(io.jans.model.token.TokenEntity token)
-
shouldPersist
public boolean shouldPersist()
-
shouldSaveInCache
public boolean shouldSaveInCache()
-
persist
public void persist(io.jans.model.token.TokenEntity token)
-
remove
public void remove(io.jans.model.token.TokenEntity token)
-
publishIdTokenLockMessage
protected void publishIdTokenLockMessage(io.jans.model.token.TokenEntity token, String opearation)
-
removeSilently
public void removeSilently(io.jans.model.token.TokenEntity token)
-
remove
public void remove(List<io.jans.model.token.TokenEntity> entries)
-
removeSilently
public void removeSilently(List<io.jans.model.token.TokenEntity> entries)
-
remove
public void remove(AuthorizationGrant grant)
-
getGrantByCode
public io.jans.model.token.TokenEntity getGrantByCode(String code)
-
getGrantByReferenceId
public io.jans.model.token.TokenEntity getGrantByReferenceId(String referenceId)
-
getGrantsByAuthorizationCode
public List<io.jans.model.token.TokenEntity> getGrantsByAuthorizationCode(String authorizationCode)
-
getGrantsBySessionDn
public List<io.jans.model.token.TokenEntity> getGrantsBySessionDn(String sessionDn)
-
logout
public void logout(String sessionDn)
-
filterOutRefreshTokenFromDeletion
public void filterOutRefreshTokenFromDeletion(List<io.jans.model.token.TokenEntity> tokens)
-
removeAllTokensBySession
public void removeAllTokensBySession(String sessionDn)
-
removeByCode
public void removeByCode(String code)
Removes grant with particular code.- Parameters:
code
- code
-
removeAuthorizationCode
public void removeAuthorizationCode(String code)
-
removeAllByAuthorizationCode
public void removeAllByAuthorizationCode(String authorizationCode)
-
removeAllByGrantId
public void removeAllByGrantId(String grantId)
-
-