|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Auth
The Auth class handles creation of Sessions and determining what rights
those Sessions have. Each QTunes object has only one Auth Service.
Different Services may register an Authorizer
with this object: when a Session is created by a call to login(java.util.Map)
,
each Authorizer for the matching Service is queried to see what "allowances"
it gives it.
Method Summary | |
---|---|
void |
addAuthorizer(Authorizer auth)
Add an Authorizer to the Auth object. |
java.util.Collection<java.lang.String> |
getAllowances(Session session)
Return the set of allowances for the specified Session |
Session |
getSession(int id)
Get the Session with the specified ID, or null if it doesn't exist |
Session |
login(java.util.Map properties)
Create a new Session |
void |
logout(Session session)
Expire the specified Session |
void |
logoutSessions(Service service)
Expire all Sessions created by the specified Service |
void |
removeAuthorizer(Authorizer auth)
Remove the previously added Authorizer from the Auth object |
Methods inherited from interface org.qtunes.core.Service |
---|
getContext, reportState, startService, stopService |
Method Detail |
---|
Session getSession(int id)
Session login(java.util.Map properties)
properties
- a Map of properties which are part of the session - the exact content
depends on the service (for example, a web service might include the Remote IP address
of the connection). These properties are tested by the various Authorizers
registered with the system to determine the set of allowances. At a minimum the
Map must contain a "session" key with the value as either the name of the Service
or the Service itself.void logout(Session session)
session
- the session to expirevoid addAuthorizer(Authorizer auth)
void removeAuthorizer(Authorizer auth)
void logoutSessions(Service service)
java.util.Collection<java.lang.String> getAllowances(Session session)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |