A lot of coding is possible, but you just need to know that Alfresco stores users internally. Even when using ldap. Therefore, the user side should be @Alfresco.
So, what you can do is display users and create a user authentication system (subsystem).
In your Java code, you can check whether the user with OpenId is authenticated successfully, then you can create a new Alfresco user and use the same username as OpenId.
So, next time you can use the user from alfresco inside.
The next question is how to manage / use / store passwords ... something that will require more investigation.
source share