|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.examples.simple.AuthorizedLetterboxService
public class AuthorizedLetterboxService
An implementation of the letterbox service that controls access with the help of a PERMIS authorization service. It serves as a policy enforcement point for the HelloWorld application.
Field Summary | |
---|---|
private org.openpermis.AuthorizationService |
authorizationService
The injected authorization service. |
private LetterboxService |
delegate
The actual service implementation to which we forward authorized requests. |
protected static URI |
LETTERBOX_URI
|
Constructor Summary | |
---|---|
AuthorizedLetterboxService(org.openpermis.AuthorizationService authorizationService,
LetterboxService delegate)
Creates an authorized letterbox service that uses the specified authorization service for making access decisions. |
Method Summary | |
---|---|
List<String> |
collectLetters(String principal)
Collect and discharge all letters contained in this letterbox. |
void |
insertLetter(String principal,
String letter)
Inserts a letter into this letterbox. |
private void |
isAuthorized(String principal,
String action)
Checks if principal is allowed to execute action. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final URI LETTERBOX_URI
private final org.openpermis.AuthorizationService authorizationService
private final LetterboxService delegate
Constructor Detail |
---|
public AuthorizedLetterboxService(org.openpermis.AuthorizationService authorizationService, LetterboxService delegate)
authorizationService
- a AuthorizationService
.delegate
- the real service implementation to which authorized requests are forwarded.Method Detail |
---|
private void isAuthorized(String principal, String action) throws LetterboxException
principal
- the principal which want to execute the action.action
- the action to execute.
LetterboxException
- indicates a negative authorization decision.public List<String> collectLetters(String principal) throws LetterboxException
LetterboxService
collectLetters
in interface LetterboxService
principal
- the principal executing this method.
LetterboxException
public void insertLetter(String principal, String letter) throws LetterboxException
LetterboxService
insertLetter
in interface LetterboxService
principal
- the principal executing this method.letter
- a letter to insert.
LetterboxException
|
![]() |
||||||||
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:15:48
Copyright (c) 2002-2007 Ergon Informatik AG