OAuth2 authentication for a plugin REST endpoint

Is it possible to leverage IIQ’s OAuth2 mechanism in a plugin REST endpoint for authenticating incoming requests?

Or is it necessary to roll one’s own OAuth2 authentication functionality?

If it is possible, are there any examples anywhere that might show how one goes about implementing it?

While I haven’t implemented this specifically myself, you should be able to use IIQ’s built-in OAuth feature to authenticate to plugin APIs. I’ve use the OAuth feature many times to create “service account identities” for 3rd-party apps to use the main IIQ APIs (especially the SCIM API) - the same process should work with Plugin APIs.