public override object GetContextAttribute(object context, GSSAttributeName attributeName) { AuthContext authContext = context as AuthContext; if (authContext != null) { switch (attributeName) { case GSSAttributeName.DomainName: return(authContext.DomainName); case GSSAttributeName.IsGuest: return(authContext.IsGuest); case GSSAttributeName.MachineName: return(authContext.WorkStation); case GSSAttributeName.OSVersion: return(authContext.OSVersion); case GSSAttributeName.SessionKey: return(authContext.SessionKey); case GSSAttributeName.UserName: return(authContext.UserName); } } return(null); }
public virtual object GetContextAttribute(GSSContext context, GSSAttributeName attributeName) { if (context == null) { return(null); } IGSSMechanism mechanism = context.Mechanism; return(mechanism.GetContextAttribute(context.MechanismContext, attributeName)); }
public object GetContextAttribute(object context, GSSAttributeName attributeName) { IGSSMechanism mechanism; if (!m_contextToMechanism.TryGetValue(context, out mechanism)) { return(null); } return(mechanism.GetContextAttribute(context, attributeName)); }
public abstract object GetContextAttribute(object context, GSSAttributeName attributeName);