Package io.jans.as.server.uma.service
Class UmaRptService
- java.lang.Object
-
- io.jans.as.server.uma.service.UmaRptService
-
@ApplicationScoped public class UmaRptService extends Object
RPT manager component- Version:
- June 28, 2017
- Author:
- Yuriy Zabrovarnyy, Javier Rojas Blum
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_RPT_LIFETIME
-
Constructor Summary
Constructors Constructor Description UmaRptService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBranch()
void
addBranchIfNeeded()
boolean
addPermissionToRPT(UmaRPT rpt, io.jans.as.model.uma.persistence.UmaPermission... permission)
boolean
addPermissionToRPT(UmaRPT rpt, Collection<io.jans.as.model.uma.persistence.UmaPermission> permissions)
String
branchDn()
org.json.JSONArray
buildPermissionsJSONObject(List<io.jans.as.model.uma.persistence.UmaPermission> permissions)
boolean
containsBranch()
String
createDn(String tokenCode)
UmaRPT
createRPTAndPersist(ExecutionContext executionContext, List<io.jans.as.model.uma.persistence.UmaPermission> permissions)
void
deleteByCode(String rptCode)
static List<String>
getPermissionDns(Collection<io.jans.as.model.uma.persistence.UmaPermission> permissions)
UmaRPT
getRPTByCode(String rptCode)
List<io.jans.as.model.uma.persistence.UmaPermission>
getRptPermissions(UmaRPT rpt)
void
merge(UmaRPT rpt)
void
persist(UmaRPT rpt)
Date
rptExpirationDate()
-
-
-
Field Detail
-
DEFAULT_RPT_LIFETIME
public static final int DEFAULT_RPT_LIFETIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPermissionDns
public static List<String> getPermissionDns(Collection<io.jans.as.model.uma.persistence.UmaPermission> permissions)
-
branchDn
public String branchDn()
-
persist
public void persist(UmaRPT rpt)
-
deleteByCode
public void deleteByCode(String rptCode)
-
addPermissionToRPT
public boolean addPermissionToRPT(UmaRPT rpt, Collection<io.jans.as.model.uma.persistence.UmaPermission> permissions)
-
addPermissionToRPT
public boolean addPermissionToRPT(UmaRPT rpt, io.jans.as.model.uma.persistence.UmaPermission... permission)
-
getRptPermissions
public List<io.jans.as.model.uma.persistence.UmaPermission> getRptPermissions(UmaRPT rpt)
-
rptExpirationDate
public Date rptExpirationDate()
-
createRPTAndPersist
public UmaRPT createRPTAndPersist(ExecutionContext executionContext, List<io.jans.as.model.uma.persistence.UmaPermission> permissions)
-
merge
public void merge(UmaRPT rpt)
-
buildPermissionsJSONObject
public org.json.JSONArray buildPermissionsJSONObject(List<io.jans.as.model.uma.persistence.UmaPermission> permissions) throws IOException, org.json.JSONException
- Throws:
IOException
org.json.JSONException
-
addBranch
public void addBranch()
-
addBranchIfNeeded
public void addBranchIfNeeded()
-
containsBranch
public boolean containsBranch()
-
-