org.aselect.server.tgt
Class TGTIssuer

java.lang.Object
  extended by org.aselect.server.tgt.TGTIssuer

public class TGTIssuer
extends java.lang.Object

Issues ASelect TGT's.

Description:
Provides methods to issue Ticket Granting Tickets in A-Select.

Concurrency issues:
-

Author:
Alfa & Ariss

Constructor Summary
TGTIssuer(java.lang.String sServerId)
          The default constructor.
 
Method Summary
 void issueCrossTGT(java.lang.String sRid, java.lang.String sAuthSP, java.util.Hashtable htRemoteAttributes, javax.servlet.http.HttpServletResponse oHttpServletResponse, java.lang.String sOldTGT, javax.servlet.http.HttpServletRequest oHttpServletRequest)
          Creates a Cross TGT and redirects the user.
 void issueErrorTGT(java.lang.String sRid, java.lang.String sResultCode, javax.servlet.http.HttpServletResponse oHttpServletResponse)
          Creates an error TGT and redirects the user.
 void issueTGT(java.lang.String sRid, java.lang.String sAuthSP, java.util.Hashtable htAdditional, javax.servlet.http.HttpServletResponse oHttpServletResponse, java.lang.String sOldTGT, javax.servlet.http.HttpServletRequest oHttpServletRequest)
          Creates a default TGT and redirects the user.
 void sendRedirect(java.lang.String sAppUrl, java.lang.String sTgt, java.lang.String sRid, javax.servlet.http.HttpServletResponse oHttpServletResponse)
          Redirect the user to the supplied application url with the given TGT and RID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TGTIssuer

public TGTIssuer(java.lang.String sServerId)
The default constructor.

Parameters:
sServerId - The A-Select server ID.
Method Detail

issueCrossTGT

public void issueCrossTGT(java.lang.String sRid,
                          java.lang.String sAuthSP,
                          java.util.Hashtable htRemoteAttributes,
                          javax.servlet.http.HttpServletResponse oHttpServletResponse,
                          java.lang.String sOldTGT,
                          javax.servlet.http.HttpServletRequest oHttpServletRequest)
                   throws ASelectException
Creates a Cross TGT and redirects the user.

Description:
Concurrency issues:
-

Preconditions:
Postconditions:
-

Parameters:
sRid - The request id (session key)
sAuthSP - The AuthSP which the used to authenticate
htRemoteAttributes - Hashtable containing additional TGT information
oHttpServletResponse - The servlet response that is used to redirect to
sOldTGT - The aselect_credentials_tgt that is already set as a cookie at the user (can be null if not present)
Throws:
ASelectException - if an error page must be shown

issueTGT

public void issueTGT(java.lang.String sRid,
                     java.lang.String sAuthSP,
                     java.util.Hashtable htAdditional,
                     javax.servlet.http.HttpServletResponse oHttpServletResponse,
                     java.lang.String sOldTGT,
                     javax.servlet.http.HttpServletRequest oHttpServletRequest)
              throws ASelectException
Creates a default TGT and redirects the user.

Description:
Concurrency issues:
-

Preconditions:
Postconditions:
-

Parameters:
sRid - The request id (session key)
sAuthSP - The AuthSP which the used to authenticate
htAdditional - Hashtable containing additional TGT information
oHttpServletResponse - The servlet response that is used to redirect to
sOldTGT - The aselect_credentials_tgt that is already set as a cookie at the user (can be null if not exists)
Throws:
ASelectException - if an error page must be shown

issueErrorTGT

public void issueErrorTGT(java.lang.String sRid,
                          java.lang.String sResultCode,
                          javax.servlet.http.HttpServletResponse oHttpServletResponse)
                   throws ASelectException
Creates an error TGT and redirects the user.

Description:
Creates a new TGT containing the error code that occured during authentication. This error code will be returned to the web application during the verify_credentials API call.

Description:

Concurrency issues:
-

Preconditions:
Postconditions:
-

Parameters:
sRid - The request id (session key)
sResultCode - The error code that occurred and will be returned to the webapplication application
oHttpServletResponse - The servlet response that is used to redirect to
Throws:
ASelectException - if an error page must be shown

sendRedirect

public void sendRedirect(java.lang.String sAppUrl,
                         java.lang.String sTgt,
                         java.lang.String sRid,
                         javax.servlet.http.HttpServletResponse oHttpServletResponse)
                  throws ASelectException
Redirect the user to the supplied application url with the given TGT and RID.

Description:
  • adds an & or ? to the application url
  • encrypts the given tgt
  • redirects the user


  • Concurrency issues:
    -

    Preconditions:
  • sAppUrl may not be null
  • sTgt may not be null
  • oHttpServletResponse may not be null


  • Postconditions:
    -

    Parameters:
    sAppUrl - application url to send the redirect to
    sTgt - TGT that will be sent with the redirect
    sRid - RID that will be sent with the redirect
    oHttpServletResponse - the user that will be redirected
    Throws:
    ASelectException - if the user could not be redirected


    Copyright © 2008 SURFnet BV. All Rights Reserved.