java.lang.Object
net.i2p.sam.SAMSecureSession
- All Implemented Interfaces:
SAMSecureSessionInterface
This is the "default" implementation of the SAMSecureSession @interface that behaves exactly like SAM without interactive authentication. It uses the i2cp username and password properties for authentication. Implementers can add their own means of authentication by substituting this interface for their own.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionThe only field is the logger, which the field initialiser takes from the global context, so a bare instance is ready to authenticate.Method Summary
All MethodsModifier and TypeMethodDescriptionbooleanapproveOrDenySecureSession(Properties i2cpProps, Properties props) Authenticate based on the i2cp username/password.
Field Details
log
Logger for this class.
Constructor Details
SAMSecureSession
public SAMSecureSession()The only field is the logger, which the field initialiser takes from the global context, so a bare instance is ready to authenticate.
Method Details
approveOrDenySecureSession
public boolean approveOrDenySecureSession(Properties i2cpProps, Properties props) throws SAMException Authenticate based on the i2cp username/password.- Specified by:
approveOrDenySecureSessionin interfaceSAMSecureSessionInterface- Parameters:
i2cpProps- the I2CP session propertiesprops- the SAM connection properties containing USER and PASSWORD- Returns:
- true if authentication succeeds
- Throws:
SAMException- if USER/PASSWORD not provided or authentication fails