Package io.jans.as.server.service
Class GrantService
- java.lang.Object
-
- io.jans.as.server.service.GrantService
-
@Named public class GrantService extends java.lang.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 java.lang.String
buildDn(java.lang.String hashedToken)
static java.lang.String
generateGrantId()
TokenEntity
getGrantByCode(java.lang.String code)
java.util.List<TokenEntity>
getGrantsByAuthorizationCode(java.lang.String authorizationCode)
java.util.List<TokenEntity>
getGrantsByGrantId(java.lang.String grantId)
java.util.List<TokenEntity>
getGrantsBySessionDn(java.lang.String sessionDn)
java.util.List<TokenEntity>
getGrantsOfClient(java.lang.String clientId)
void
logout(java.lang.String sessionDn)
void
merge(TokenEntity token)
void
mergeSilently(TokenEntity token)
void
persist(TokenEntity token)
void
remove(AuthorizationGrant grant)
void
remove(TokenEntity token)
void
remove(java.util.List<TokenEntity> entries)
void
removeAllByAuthorizationCode(java.lang.String authorizationCode)
void
removeAllByGrantId(java.lang.String grantId)
void
removeAllTokensBySession(java.lang.String sessionDn)
void
removeAuthorizationCode(java.lang.String code)
void
removeByCode(java.lang.String code)
Removes grant with particular code.void
removeSilently(TokenEntity token)
void
removeSilently(java.util.List<TokenEntity> entries)
-
-
-
Method Detail
-
generateGrantId
public static java.lang.String generateGrantId()
-
buildDn
public java.lang.String buildDn(java.lang.String hashedToken)
-
merge
public void merge(TokenEntity token)
-
mergeSilently
public void mergeSilently(TokenEntity token)
-
persist
public void persist(TokenEntity token)
-
remove
public void remove(TokenEntity token)
-
removeSilently
public void removeSilently(TokenEntity token)
-
remove
public void remove(java.util.List<TokenEntity> entries)
-
removeSilently
public void removeSilently(java.util.List<TokenEntity> entries)
-
remove
public void remove(AuthorizationGrant grant)
-
getGrantsOfClient
public java.util.List<TokenEntity> getGrantsOfClient(java.lang.String clientId)
-
getGrantByCode
public TokenEntity getGrantByCode(java.lang.String code)
-
getGrantsByGrantId
public java.util.List<TokenEntity> getGrantsByGrantId(java.lang.String grantId)
-
getGrantsByAuthorizationCode
public java.util.List<TokenEntity> getGrantsByAuthorizationCode(java.lang.String authorizationCode)
-
getGrantsBySessionDn
public java.util.List<TokenEntity> getGrantsBySessionDn(java.lang.String sessionDn)
-
logout
public void logout(java.lang.String sessionDn)
-
removeAllTokensBySession
public void removeAllTokensBySession(java.lang.String sessionDn)
-
removeByCode
public void removeByCode(java.lang.String code)
Removes grant with particular code.- Parameters:
code
- code
-
removeAuthorizationCode
public void removeAuthorizationCode(java.lang.String code)
-
removeAllByAuthorizationCode
public void removeAllByAuthorizationCode(java.lang.String authorizationCode)
-
removeAllByGrantId
public void removeAllByGrantId(java.lang.String grantId)
-
-