Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

How to create a ProGet user through the API



  • Hi there,

    I'm using ProGet to provide private NuGet feeds to my customers. Once they pay for a subscription, I'm adding their company as a ProGet user. Currently this is a completely manual process, and I'm willing to use ProGet JSON API to automate it.

    I've found the Users_CreateOrUpdateUser method under the /reference/api url, however I can't find how to:

    1. Set a password for a user – there is no any method to do this. There is the Users_SetPassword stored procedure, but I don't know how to generate salt bytes.
    2. How to form a Groups_Xml argument, since I completely don't know the required XML schema.

    Can you help me with the questions?

    Product: ProGet
    Version: 3.7.1



  • Much of the ProGet API is going to be reimplemented in a future release (see roadmap here). Right now as you've seen it's just a thin wrapper around some of the stored procedures. We used to use that stored procedure to hash the user's password, but moved the hashing logic to the web app to increase security and portability (since ProGet also now runs on Linux/Postgres).

    Short of a new API, there is currently no supported way of doing this, but if you're okay with doing something unsupported, I could email you sample code for doing the hashing and forming the Groups_Xml.



  • Hi Dean,

    This is not a problem, user adding is an internal task, and I'm able to rewrite it once there will be a new way of doing this. Should I tell you my email in this topic (or perhaps you already know it)?



  • I can send to the email associated with this forum post if that works for you, otherwise send a message to support at Inedo.com to let me know where to send it.



  • Please use the email associated with the forum post. Many thanks for your answers!



  • Hello, colleagues.

    Could you tell me: is something was changed in API in order to create a user with password?

    Regards,
    Roman


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation