public class UserAuthGSS extends Object implements HandshakingUserAuth
HandshakingUserAuth
because
the process involves several steps.
Several methods are available for overriding in specific circumstances.Modifier and Type | Class and Description |
---|---|
static class |
UserAuthGSS.Factory
Factory class.
|
Modifier and Type | Field and Description |
---|---|
static Oid |
KRB5_MECH |
static Oid |
KRB5_NT_PRINCIPAL |
Constructor and Description |
---|
UserAuthGSS() |
Modifier and Type | Method and Description |
---|---|
Boolean |
auth(ServerSession sess,
String user,
Buffer buff)
Handle the first authentication step.
|
void |
destroy()
Free any system resources used by the module.
|
String |
getUserName()
Get a user name which has been derived from the handshaking process, or the initial name if
nothing has been found.
|
boolean |
handles(SshConstants.Message msg)
Check whether a particular message is handled here.
|
Boolean |
next(ServerSession session,
SshConstants.Message msg,
Buffer buffer)
Handle another step in the authentication process.
|
void |
setServiceName(String service)
Set the service name from the original request.
|
public static final Oid KRB5_MECH
public static final Oid KRB5_NT_PRINCIPAL
public Boolean auth(ServerSession sess, String user, Buffer buff) throws Exception
public void setServiceName(String service)
setServiceName
in interface HandshakingUserAuth
service
- The service namepublic boolean handles(SshConstants.Message msg)
handles
in interface HandshakingUserAuth
msg
- The messagetrue
if the message is handledpublic Boolean next(ServerSession session, SshConstants.Message msg, Buffer buffer) throws Exception
next
in interface HandshakingUserAuth
session
- the current ssh sessionbuffer
- the request buffer containing parameters specific to this requestmsg
- The message typetrue
if the authentication succeeded, false
if the authentication
is not finished yetException
- if the authentication failspublic String getUserName() throws GSSException
getUserName
in interface HandshakingUserAuth
GSSException
public void destroy()
destroy
in interface HandshakingUserAuth
Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.