uk.ac.rdg.resc.jstyx.server
Class AuthFile

java.lang.Object
  extended by uk.ac.rdg.resc.jstyx.server.StyxFile
      extended by uk.ac.rdg.resc.jstyx.server.InMemoryFile
          extended by uk.ac.rdg.resc.jstyx.server.AuthFile

public class AuthFile
extends InMemoryFile

StyxFile that is used to exchange authentication information. Clients must write their password into this file.

Author:
Jon Blower $Revision: 601 $ $Date: 2006-03-20 17:51:50 +0000 (Mon, 20 Mar 2006) $ $Log$ Revision 1.1 2006/03/20 17:51:50 jonblower Adding authentication to base JStyx system

Field Summary
 
Fields inherited from class uk.ac.rdg.resc.jstyx.server.InMemoryFile
buf
 
Fields inherited from class uk.ac.rdg.resc.jstyx.server.StyxFile
auth, directory, lastModifiedTime, name, parent
 
Constructor Summary
AuthFile(StyxSecurityContext securityContext, java.lang.String username)
          Creates a new instance of AuthFile
 
Method Summary
 User getUser()
           
 boolean isAuthenticated(java.lang.String username)
           
 
Methods inherited from class uk.ac.rdg.resc.jstyx.server.InMemoryFile
delete, getContents, getLength, main, read, setContents, write
 
Methods inherited from class uk.ac.rdg.resc.jstyx.server.StyxFile
addChangeListener, addClient, checkSetLastModifiedTime, checkSetLength, checkSetMode, checkSetName, clientConnected, clientDisconnected, contentsChanged, fireContentsChanged, getClient, getDirEntry, getFullPath, getGroup, getName, getNumClients, getOwner, getParent, getPermissions, getQid, getVersion, incrementVersion, isAppendOnly, isAuth, isDirectory, isExclusive, processAndReplyRead, processAndReplyRead, processAndReplyRead, refresh, remove, removeChangeListener, removeClient, rename, replyRead, replyRead, replyRead, replyRead, replyRead, replyWrite, setLastAccessTime, setLastModified, setLength, setMode, setName, setPermissions, setReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthFile

public AuthFile(StyxSecurityContext securityContext,
                java.lang.String username)
         throws StyxException
Creates a new instance of AuthFile

Parameters:
securityContext - The security context for this connection
username - The name of the user (as claimed by the user)
Throws:
StyxSecurityException - if the user could not be identified or if there was an error reading from the security context information
StyxException
Method Detail

isAuthenticated

public boolean isAuthenticated(java.lang.String username)
Returns:
true if the user with the given name has successfully authenticated

getUser

public User getUser()
Returns:
the User that this AuthFile belongs to


Copyright © 2004-2006 Reading e-Science Centre. All Rights Reserved.