|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.repository.basic.AbstractSubjectRepository
public abstract class AbstractSubjectRepository
An abstract subject repository with all code used (or usable) by subclasses.
Field Summary | |
---|---|
private CertificateVerifier |
certificateVerifier
The internally user class to verify certificates. |
Constructor Summary | |
---|---|
protected |
AbstractSubjectRepository(CertificateVerifier certificateVerifier)
Creates an abstract subject repository and uses the specified certificate verifier to validate the attribute certificates. |
Method Summary | |
---|---|
private InternalSubject |
getOrCreateSubject(Map<URI,InternalSubject> subjectsByIdentity,
URI identity)
Internal method looking up a subject and creating it if it does not exist. |
private boolean |
isCertificateCorrect(Certificate certificate)
Checks if the specified certificate is valid. |
protected void |
updateSubjectMap(Map<URI,InternalSubject> subjectsByIdentity,
AttributeCertificate certificate)
Updates the specified subject-by-identity map by processing the specified attribute certificate and assigning roles to all affected subjects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openpermis.repository.SubjectRepository |
---|
retrieveSubject |
Field Detail |
---|
private final CertificateVerifier certificateVerifier
Constructor Detail |
---|
protected AbstractSubjectRepository(CertificateVerifier certificateVerifier)
certificateVerifier
- The certificate verifier user to verify the the attribute
certificates. Must not be null
.Method Detail |
---|
protected void updateSubjectMap(Map<URI,InternalSubject> subjectsByIdentity, AttributeCertificate certificate) throws NoSuchAlgorithmException, NoSuchProviderException
subjectsByIdentity
- A map storing subjects by their identities. Must not be
null
.certificate
- The attribute certificate to process. May be null.
NoSuchAlgorithmException
NoSuchProviderException
private boolean isCertificateCorrect(Certificate certificate) throws NoSuchAlgorithmException, NoSuchProviderException
true
if (and only if) the certificate could be verified.
NoSuchProviderException
- Thrown if there is no default crypto provider.
NoSuchAlgorithmException
- Thrown if a cryptographic algorithm used for signature
verification cannot be retrieved from the crypto provider(s).private InternalSubject getOrCreateSubject(Map<URI,InternalSubject> subjectsByIdentity, URI identity)
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:14:59
Copyright (c) 2002-2007 Ergon Informatik AG