Integrate the 'jf login' web login command behavior to your service or CLI using JFrog undocumented Access APIs. The web login command allows you to login to the JFrog platform through a web browser, making the process interactive and user-friendly.
The Platform REST URL is constructed of:
<JFrog URL>/<Service Context>/
For example:
# Using your JFrog URL
http://artifactory.mycompany.com/access/
Usage: POST api/v2/authentication/jfrog_client_login/request -H "Content-Type: application/json"
Consumes: application/json
POST /api/v2/authentication/jfrog_client_login/request
{
"session": "274f11d9-9d2f-4fd3-813d-a6551c8dd916", // generated uuid
}
Usage: GET api/v2/authentication/jfrog_client_login/token/{uuid}
Sample Output:
{
"token_id" : "3693ad1a-fdb7-4ca4-b0d2-bed0b08b7717",
"access_token" : "****",
"refresh_token" : "ba66b7ec-c106-4b73-84b2-dba34bf4d96f",
"expires_in" : 31536000,
"scope" : "****",
"token_type" : "Bearer",
"username" : "username@mycompany.com"
}