pub unsafe trait TKTokenDelegate: NSObjectProtocol {
// Provided methods
unsafe fn token_createSessionWithError(
&self,
token: &TKToken,
) -> Result<Retained<TKTokenSession>, Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn token_terminateSession(
&self,
token: &TKToken,
session: &TKTokenSession,
)
where Self: Sized + Message { ... }
}TKToken only.Expand description
TKTokenDelegate contains operations implementing functionality of token class.
TKTokenDelegate represents protocol which must be implemented by token implementors’ class representing token. Apart from being able to identify itself with its unique identifier, and must be able to establish new TKTokenSession when requested.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn token_createSessionWithError(
&self,
token: &TKToken,
) -> Result<Retained<TKTokenSession>, Retained<NSError>>
unsafe fn token_createSessionWithError( &self, token: &TKToken, ) -> Result<Retained<TKTokenSession>, Retained<NSError>>
Create new session instance
All operations with objects on the token are performed inside TKTokenSession which represent authentication context. This method is called whenever new authentication context is needed (typically when client application wants to perform token operation using keychain object which has associated LocalAuthentication LAContext which was not yet seen by this token instance).
Parameter token: Related token instance.
Sourceunsafe fn token_terminateSession(
&self,
token: &TKToken,
session: &TKTokenSession,
)
unsafe fn token_terminateSession( &self, token: &TKToken, session: &TKTokenSession, )
Terminates previously created session, implementation should free all associated resources.
Parameter token: Related token instance.