com.trendmicro.grid.acl.l0
Class PublicAuthenticationRestService

java.lang.Object
  extended by com.trendmicro.grid.acl.l0.PublicAuthenticationRestService
All Implemented Interfaces:
Level0RestService, RestService, Service

@Service
public class PublicAuthenticationRestService
extends Object
implements Level0RestService

Implements a REST api to PublicAuthenticationService, to prepare the offering of REST services with authentication.

Version:
1.0
Author:
Juergen_Kellerer, 2011-04-14

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.trendmicro.grid.acl.l0.Level0RestService
Level0RestService.RestUtil
 
Constructor Summary
PublicAuthenticationRestService()
           
 
Method Summary
 String authenticate(String username, String password)
          Delegates to PublicAuthenticationService.authenticate(String, String).
 String getApiKey(String username, String password, SortedSet<String> requiredRoles)
          Delegates to PublicAuthenticationService.authenticateAndGetApiKey(String, char[], java.util.Set) or PublicAuthenticationService.getApiKey(java.util.Set) depending on whether username and password where specified or not.
 String getUserDisplayName()
          Delegates to PublicAuthenticationService.getUserDisplayName().
 String getUserRoles()
          Delegates to PublicAuthenticationService.getUserRoles().
 String isAuthenticated()
          Delegates to PublicAuthenticationService.isAuthenticated().
 String logout()
          Delegates to PublicAuthenticationService.logout().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublicAuthenticationRestService

public PublicAuthenticationRestService()
Method Detail

isAuthenticated

public String isAuthenticated()
Delegates to PublicAuthenticationService.isAuthenticated().

Returns:
string value of the delegate's return value.

authenticate

public String authenticate(String username,
                           String password)
Delegates to PublicAuthenticationService.authenticate(String, String).

Parameters:
username - The query parameter containing the username.
password - The query parameter containing the password.
Returns:
string value of the delegate's return value.

logout

public String logout()
Delegates to PublicAuthenticationService.logout().

Returns:
string value of the delegate's return value.

getApiKey

public String getApiKey(String username,
                        String password,
                        SortedSet<String> requiredRoles)
Delegates to PublicAuthenticationService.authenticateAndGetApiKey(String, char[], java.util.Set) or PublicAuthenticationService.getApiKey(java.util.Set) depending on whether username and password where specified or not.

Parameters:
username - The query parameter containing the username (optional, defaults to "").
password - The query parameter containing the password (optional, defaults to "").
requiredRoles - The set of required roles (see delegate for more info).
Returns:
the string value of the delegate's return value.

getUserDisplayName

public String getUserDisplayName()
Delegates to PublicAuthenticationService.getUserDisplayName().

Returns:
string value of the delegate's return value.

getUserRoles

public String getUserRoles()
Delegates to PublicAuthenticationService.getUserRoles().

Returns:
string value of the delegate's return value (space delimited string list).