#! /bin/sh # Copyright (c) 2003-2016 # Distributed Systems Software. All rights reserved. # See the file LICENSE for redistribution information. # # $Id: gridlogin 2873 2016-03-12 18:54:40Z brachman $ # This illustrates how a jurisdiction might construct a login page for # use with auth_grid/local_grid_authenticate. # To use it, you will need to change the value of DACS_JURIDICTION to the name # of your authenticating jurisdiction and you may also need to change some # paths. # # Note: it assumes that all grids are the same size because it does not # know the username at the time it gets a challenge, so it cannot know # the dimensions of that user's grid. A real implementation might first get # the username and then ask auth_grid for a challenge that is correct for that # user's grid (if any). Or, it might retrieve the dimensions of that user's # grid (if any), build the correct arguments for auth_grid without passing the # username, and then obtain and display a challenge. In any case, some # JavaScript glue must do this. # Change these paths if necessary challenge=`/usr/local/dacs/bin/auth_grid -uj DSS-dacs -clen 3 -challenge` token=`/usr/local/dacs/bin/auth_grid -uj DSS-dacs -enc "${challenge}"` echo 'Content-type: text/html' echo '' echo 'DACS Login' echo '' echo '' echo '' echo '' echo '' echo '

DACS Login

' echo '
' echo '' echo '' echo '' echo "" echo '' echo '' echo '' echo '' echo '' echo '' echo '' echo '' echo "" echo '' echo '' echo '' echo '' echo '' echo '' echo '' echo '' echo '' echo '' echo '' echo '' echo '' echo '
User Name: 
Challenge:${challenge} 
Password:
(If you have a PIN, enter it first)
' echo '
' echo '' echo '' exit 0