Difference between revisions of "Using credentials in Portlets and Servlets"

From Gcube Wiki
Jump to: navigation, search
Line 5: Line 5:
 
In order to use credentials you have first to patch gridSphere so as to enable it to consume DILIGENT Credentials.<br>
 
In order to use credentials you have first to patch gridSphere so as to enable it to consume DILIGENT Credentials.<br>
 
''(info to be added...)''
 
''(info to be added...)''
==Credentials API==
+
==Using Credentials API==
 
===Available Methods===
 
===Available Methods===
 
====ExtendedGSSCredential  getCredentials(PortletSession session)====
 
====ExtendedGSSCredential  getCredentials(PortletSession session)====
*You should use this method if you want to retrieve the credential from the portlet.
+
*You should use this method if you want to retrieve the credential from the '''''portlet'''''.
*This method returns a grid credential that you should pass to DIS or every other service that you want to use.
+
*It returns a grid credential that you should pass to DIS or every other service that you want to use.
 
====ExtendedGSSCredential getCredentials(HttpSession session)====
 
====ExtendedGSSCredential getCredentials(HttpSession session)====
*You should use this method if you want to retrieve the credential from the servlet.
+
*You should use this method if you want to retrieve the credential from the '''''servlet'''''.
*This method returns a grid credential that you should pass to DIS or every other service that you want to use.
+
*It returns a grid credential that you should pass to DIS or every other service that you want to use.
 +
====String getHttpScheme(String sessionID)====
 +
*It takes as parameter the sessionID.
 +
*It returns the schema that the user uses in order to communicate with the portal (''http'' / ''https'').
 +
====String getCurrentTab(String sessionID)====
 +
*It takes as parameter the sessionID.
 +
*It returns the name of user's current tab.
 +
====HashMap<String, String> getUserInfo(String sessionID)====
 +
*It takes as parameter the sessionID.
 +
*It returns a HashMap with all the userInfo
 +
====String getDN(String sessionID)====
 +
*It takes as parameter the sessionID.
 +
*It returns the DN of the user credential.
 +
====String getCA(String sessionID)====
 +
*It takes as parameter the sessionID.
 +
*It returns the CA of the user credential.
 +
====String getCN(String sessionID)====
 +
*It takes as parameter the sessionID.
 +
*It returns the CN of the user credential.

Revision as of 15:57, 25 May 2007

How to use DILIGENT credentials in a Portlet / Servlet

Pre-development Actions

Patching GridSphere

In order to use credentials you have first to patch gridSphere so as to enable it to consume DILIGENT Credentials.
(info to be added...)

Using Credentials API

Available Methods

ExtendedGSSCredential getCredentials(PortletSession session)

  • You should use this method if you want to retrieve the credential from the portlet.
  • It returns a grid credential that you should pass to DIS or every other service that you want to use.

ExtendedGSSCredential getCredentials(HttpSession session)

  • You should use this method if you want to retrieve the credential from the servlet.
  • It returns a grid credential that you should pass to DIS or every other service that you want to use.

String getHttpScheme(String sessionID)

  • It takes as parameter the sessionID.
  • It returns the schema that the user uses in order to communicate with the portal (http / https).

String getCurrentTab(String sessionID)

  • It takes as parameter the sessionID.
  • It returns the name of user's current tab.

HashMap<String, String> getUserInfo(String sessionID)

  • It takes as parameter the sessionID.
  • It returns a HashMap with all the userInfo

String getDN(String sessionID)

  • It takes as parameter the sessionID.
  • It returns the DN of the user credential.

String getCA(String sessionID)

  • It takes as parameter the sessionID.
  • It returns the CA of the user credential.

String getCN(String sessionID)

  • It takes as parameter the sessionID.
  • It returns the CN of the user credential.