org.openanzo.services
Interface IAuthenticationService

All Superinterfaces:
IService
All Known Implementing Classes:
EmbeddedAuthenticationService, WSAuthenticationService

public interface IAuthenticationService
extends IService

The IAuthenticationService provides an endpoint that services can use in order to authenticate a user against Anzo's authentication service.

Author:
Matthew Roy ( mroy@cambridgesemantics.com )

Method Summary
 org.openrdf.model.URI authenticateUser(java.lang.String userId, java.lang.String password)
          Authenticates the user with a given userId and password against the Anzo Server's authentication service, and returns the user's URI in Anzo.
 java.util.Set<org.openrdf.model.URI> getRolesForGraph(org.openrdf.model.URI namedGraphUri)
          Get the roles that can read a given NamedGraph
 java.util.Set<org.openrdf.model.URI> getRolesForUser(org.openrdf.model.URI userURI)
          Get roles that given user is a member
 java.util.Set<org.openrdf.model.URI> getUsersForGraph(org.openrdf.model.URI namedGraphUri)
          Get the users that can read a given NamedGraph
 org.openrdf.model.URI getUserUri(java.lang.String userId)
          Get the User's URI based on userId
 
Methods inherited from interface org.openanzo.services.IService
getServicePassword, getServiceUser, setServicePassword, setServiceUser
 

Method Detail

authenticateUser

org.openrdf.model.URI authenticateUser(java.lang.String userId,
                                       java.lang.String password)
                                       throws AnzoException
Authenticates the user with a given userId and password against the Anzo Server's authentication service, and returns the user's URI in Anzo.

Parameters:
userId - The id the user is authenticating against
password - The password for the id the user is authenticating against
Returns:
The uri for the user in Anzo.
Throws:
AnzoException - is raised if authentication fails.

getUserUri

org.openrdf.model.URI getUserUri(java.lang.String userId)
                                 throws AnzoException
Get the User's URI based on userId

Parameters:
userId - The id the user is authenticating against
Returns:
The uri for the user in Anzo.
Throws:
AnzoException - if getting URI of id fails

getRolesForUser

java.util.Set<org.openrdf.model.URI> getRolesForUser(org.openrdf.model.URI userURI)
                                                     throws AnzoException
Get roles that given user is a member

Parameters:
userURI - The URI of the user to get roles
Returns:
Set of roles that user is a member
Throws:
AnzoException - if getting roles for user fails

getUsersForGraph

java.util.Set<org.openrdf.model.URI> getUsersForGraph(org.openrdf.model.URI namedGraphUri)
                                                      throws AnzoException
Get the users that can read a given NamedGraph

Parameters:
namedGraphUri - URI of NamedGraph
Returns:
Set of user's URIS that can read the NamedGraph
Throws:
AnzoException - if getting users for graph fails

getRolesForGraph

java.util.Set<org.openrdf.model.URI> getRolesForGraph(org.openrdf.model.URI namedGraphUri)
                                                      throws AnzoException
Get the roles that can read a given NamedGraph

Parameters:
namedGraphUri - URI of NamedGraph
Returns:
Set of roles's URIS that can read the NamedGraph
Throws:
AnzoException - if getting roles for graph fails


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.