Nexus 3.11.0 - activate the "npm Bearer Token Realm" using the REST API

684 views
Skip to first unread message

Nicholas Grealy

unread,
May 23, 2018, 9:02:11 PM5/23/18
to Nexus Users
Hi all,

I have a fresh instance of Nexus 3.11.0 running in a docker container, which I'm trying to entirely configure remotely using the REST API

I've managed to configure a new NPM repository using the Script API (so far so good).

Now I need to activate the "npm Bearer Token Realm" (as per this screenshot) so that I can publish artifacts, but I can't workout how to activate a Realm using the Script API (or any other API). 

I can't see any examples, and the API Docs have no mention of the work "Realm" anywhere. 

Can anyone point me in the right direction?

Thanks,

Nick


Mark Dodgson

unread,
May 24, 2018, 6:09:49 AM5/24/18
to Nicholas Grealy, Nexus Users
Hi Nicholas,

Here is a script for enabling multiple realms. You should be able to adjust this quite easily for just npm


Thanks,

Mark

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/05dc96cb-245d-4c91-889a-a6e6648c55f9%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Nicholas Grealy

unread,
May 27, 2018, 8:59:37 PM5/27/18
to Nexus Users, nickg...@gmail.com
That's perfect, thank you!
Reply all
Reply to author
Forward
0 new messages