Show / Hide Table of Contents

ApplicationSession Class

Namespace: Yubico.YubiKey Assembly: Yubico.YubiKey.dll

Abstract base class for sessions with a YubiKey. This class is used to wrap the IYubiKeyConnection and provide a way of interacting with the connection that is more convenient for most users.

C#
public abstract class ApplicationSession
Inheritance object ApplicationSession
OathSession
OtpSession
PivSession
SecurityDomainSession
YubiHsmAuthSession

Constructors

Name Description
ApplicationSession(ILogger, IYubiKeyDevice, YubiKeyApplication, ScpKeyParameters?)

Initializes a new instance of the ApplicationSession class with logging, YubiKey device, application, and optional SCP key parameters.

Properties

Name Description
Application

The specific YubiKey application to connect to.

Connection

The object that represents the connection to the YubiKey. Most applications will ignore this, but it can be used to call Commands directly.

KeyParameters

Gets the parameters used for establishing a Secure Channel Protocol (SCP) connection.

Logger

The logger instance used for logging information.

YubiKey

The YubiKey device to establish a session with.

Methods

Name Description
Dispose()

When the ApplicationSession object goes out of scope, this method is called. It will close the session. The most important function of closing a session is to "un-authenticate" the management key and "un-verify" the PIN.

Dispose(bool)
GetConnection(IYubiKeyDevice, YubiKeyApplication, ScpKeyParameters?)
In this article
Back to top Generated by DocFX