Authentication Web Service

cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication Web Service

resplin
Intermediate
0 0 3,112

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



Web ServicesAuthentication
Back to Alfresco Content Management Web Services.




This service provides simple authentication capability.

Before access to other Web Services is allowed, a session has to be established.  The authentication ticket obtained upon succesful login is placed into subsequent SOAP header calls.

Note: Investigation into WS-Security is taking place.


Data Types


AuthenticationResult


Encapsulates the result of an authentication request.


  • string ticket - a string containing the user ticket for this session
  • string username - the name of the user for whom this ticket applies

Methods


startSession


This method establishes a session with the repository and returns the user ticket. A session must be started before calls to other web services can be made.

AuthenticationResult startSession(string username, string password)

Parameters:


  • username - the user name
  • password - the password

Return:


  • the authentication results, including the allocated ticket

endSession


This method ends the current session with the repository.

authenticate.endSession(string ticket)

Parameters:


  • ticket - the ticket of the session to end.

Code example


               authentication.AuthenticationService service =
                       new authentication.AuthenticationService();
               authentication.AuthenticationServiceSoapPort port =
                       service.getAuthenticationService();

               // TODO initialize WS operation arguments here
               java.lang.String username = 'admin';
               java.lang.String password = 'admin';

               // TODO process result here
               authentication.AuthenticationResult result =
                       port.startSession(username, password);
               System.out.println('Result = '+result);