Difference between revisions of "OKMAuth"

From OpenKM Documentation
Jump to: navigation, search
Line 6: Line 6:
 
Login into the repository and gets a token with user info for future API invocations
 
Login into the repository and gets a token with user info for future API invocations
  
=== Parameters ====
+
==== Parameters ====
 
* user - User nam for login.
 
* user - User nam for login.
 
* pass - Password for login.
 
* pass - Password for login.
  
=== Returns ===
+
==== Returns ====
 
* A token with authorization session info for next API invocations.
 
* A token with authorization session info for next API invocations.
  
=== Throws ===
+
==== Throws ====
 
* UserAlreadyLoggerException - If the user is already logged into the system.   
 
* UserAlreadyLoggerException - If the user is already logged into the system.   
 
* AccessDeniedException - If authorization fails.
 
* AccessDeniedException - If authorization fails.
Line 21: Line 21:
 
Log out from the repository. Invalidates the authorization token.
 
Log out from the repository. Invalidates the authorization token.
  
=== Parameters ===
+
==== Parameters ====
 
* token - The session authorization token.
 
* token - The session authorization token.
  
=== Returns ===
+
==== Returns ====
 
* none
 
* none
  
=== Throws ===
+
==== Throws ====
 
* AccessDeniedException - If token is not valid.
 
* AccessDeniedException - If token is not valid.
 
* RepositoryException – If there is an error accessing to repository.
 
* RepositoryException – If there is an error accessing to repository.
Line 34: Line 34:
 
Retrieves a list of repository users.
 
Retrieves a list of repository users.
  
=== Parameters ===
+
==== Parameters ====
 
* token – The session authorization token.
 
* token – The session authorization token.
  
=== Returns ===
+
==== Returns ====
 
* A collection of repository users.
 
* A collection of repository users.
  
=== Throws ===
+
==== Throws ====
 
* RepositoryException – If there is any error retrieving the users list.
 
* RepositoryException – If there is any error retrieving the users list.
  
Line 46: Line 46:
 
Retrieves a list of repository roles.
 
Retrieves a list of repository roles.
  
=== Parameters ===
+
==== Parameters ====
 
* token – The session authorization token.
 
* token – The session authorization token.
  

Revision as of 09:40, 8 March 2010

Methods related to authentication, granting and revoking privileges.

String login(String user, String pas)

Login into the repository and gets a token with user info for future API invocations

Parameters

  • user - User nam for login.
  • pass - Password for login.

Returns

  • A token with authorization session info for next API invocations.

Throws

  • UserAlreadyLoggerException - If the user is already logged into the system.
  • AccessDeniedException - If authorization fails.
  • RepositoryException - If there is an error accessing to repository.

void logout(String token)

Log out from the repository. Invalidates the authorization token.

Parameters

  • token - The session authorization token.

Returns

  • none

Throws

  • AccessDeniedException - If token is not valid.
  • RepositoryException – If there is an error accessing to repository.

StringArray getUsers(String token)

Retrieves a list of repository users.

Parameters

  • token – The session authorization token.

Returns

  • A collection of repository users.

Throws

  • RepositoryException – If there is any error retrieving the users list.

StringArray getRoles(String token)

Retrieves a list of repository roles.

Parameters

  • token – The session authorization token.

Returns

  • A collection of repository roles.

Throws

  • RepositoryException – If there is any error retrieving the roles list.