I am using Nexus oss version 3.69.0-02.
I have “npm Bearer Token Realm” set to active.
I am trying to create an npm repo using the following json:
{
"name": "npm_proxy",
"online": true,
"storage": {
"blobStoreName": "default",
"strictContentTypeValidation": false
},
"proxy": {
"remoteUrl": "<REMOTE URL>",
"contentMaxAge": 0,
"metadataMaxAge": 0
},
"negativeCache": {
"enabled": false,
"timeToLive": 1440
},
"httpClient": {
"blocked": false,
"autoBlock": true,
"connection": {
"retries": 2,
"timeout": 160,
"enableCircularRedirects": false,
"enableCookies": false,
"useTrustStore": true
},
"authentication": {
"type": "bearerToken",
"bearerToken": "<BEARERTOKEN>"
}
},
"npm": {
"removeNonCataloged": true,
"removeQuarantined": true
}
}
The API doesn’t seem to be able to create the value for the bearertoken and I get this message:
"id" : "BearerTokenAuthenticationConfiguration.attributes[httpclient].authentication.bearerToken",
"message" : "must not be blank"
Is it possible to create an NPM repo with a bearer token using the API?