Fixing up API

This commit is contained in:
Sarah Jamie Lewis 2021-01-12 04:19:49 -08:00
parent 27bf5e3ac0
commit e36d4e2c0a
1 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ pub enum AuthenticationAppError {
NotAuthenticatedError,
}
pub const AuthenticationCapability : Capability = Capability("AuthenticationCapability");
pub const AUTHENTICATION_CAPABILITY: Capability = Capability("AuthenticationCapability");
struct AuthenticationSession<Direction> {
long_term_identity: Arc<Identity>,
@ -37,7 +37,7 @@ struct AuthenticationSession<Direction> {
}
impl<Direction> AuthenticationSession<Direction> where Direction:Clone {
pub fn new_outbound(mut conn: Connection<OutboundConnection>, long_term_identity: Arc<Identity>) -> AuthenticationSession<OutboundConnection> {
pub fn new_outbound(conn: Connection<OutboundConnection>, long_term_identity: Arc<Identity>) -> AuthenticationSession<OutboundConnection> {
let ephemeral_identity = Identity::initialize_ephemeral_identity();
let mut auth_session = AuthenticationSession {
long_term_identity,
@ -53,7 +53,7 @@ impl<Direction> AuthenticationSession<Direction> where Direction:Clone {
auth_session
}
pub fn new_inbound(mut conn: Connection<InboundConnection>, long_term_identity: Arc<Identity>) -> AuthenticationSession<InboundConnection> {
pub fn new_inbound(conn: Connection<InboundConnection>, long_term_identity: Arc<Identity>) -> AuthenticationSession<InboundConnection> {
let ephemeral_identity = Identity::initialize_ephemeral_identity();
let mut auth_session = AuthenticationSession {
long_term_identity,
@ -112,7 +112,7 @@ impl<Direction> AuthenticationSession<Direction> where Direction:Clone {
self.conn.shutdown();
Err(NotAuthenticatedError)
}
Err(err) => Err(NotAuthenticatedError),
Err(_err) => Err(NotAuthenticatedError),
}
}
}