IDENTITY-2821 authentication.framework

Do the same double locking thing