The first approach is much better if you want to leverage the ACL management provided by nuxeo.
With the second one, you will need to verify outside nuxeo if a given user has access to a certain content or not.
The second approach is the easiest one but I suggest using the first approach. The way to do this is to create a custom authentication plugin in Java within nuxeo.
This custom authentication plugin will be responsible for calling your external authentication solution, verify if the user is authenticated, and if it is the case, authenticate the user in nuxeo (or create it if the user doesn't exist).
Below you will find some examples of how to do this:
https://github.com/michaelgena/nuxeo-unify-sso
https://www.nuxeo.com/blog/guest-post-integrating-single-sign-sso-nuxeo-case-management/
The nuxeo authentication solution is pluggable, which means that you can add your custom authentication mechanism so that whenever a user tries to connect to nuxeo the authentication goes through your custom authentication plugin.