head	1.1;
access;
symbols;
locks
	cbbrowne:1.1; strict;
comment	@# @;


1.1
date	2000.06.09.12.32.50;	author cbbrowne;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@#!/usr/bin/env python
import CORBA
import sys
import time
from time import sleep

CORBA.load_idl("security.idl")
orb = CORBA.ORB_init((), CORBA.ORB_ID)
ior = open("./security-server.ior").readline()
s = orb.string_to_object(ior)
print s.__repo_id

try:
	token=s.login("chris", "browne")
	print "Authenticated chris getting token", token
except s.NOTAUTHENTICATED:
	print "Couldn't get token for chris"
sleep(3)
try:
	token=s.login("chris", "blah")
	print "Authenticated chris getting token", token
except s.NOTAUTHENTICATED:
	print "Couldn't get token for chris"
sleep(3)
try:
	token=s.login("david", "blah")
	print "Authenticated david getting token", token
except s.NOTAUTHENTICATED:
	print "Couldn't get token for david"
sleep(3)
try:
	token=s.login("david", "browne")
	print "Authenticated david getting token", token
except s.NOTAUTHENTICATED:
	print "Couldn't get token for david"
sleep(3)
@
