Quickstart
User Session Authentication Manager
These are the user authentication features. See more.
Listing available OAuth providers
Want to know which OAuth authentication providers are available? Just do it:
Example
Usage:
$ doky auth providers
Result:
Success! These are the available OAuth providers:
- docker
Code:
1 2 |
|
Result:
['docker']
Requesting for an OAuth URL
Save time by generating the authentication URL, default provider is docker:
Example
Usage:
$ doky auth oauth [--provider NAME]
Result:
The OAuth URL was obtained successfully!
https://login.docker.com/authorize/?client_id=XXXXXX&nonce=XXXXXX&redirect_uri=XXXXXX&response_type=code&scope=XXXXXX&state=XXXXXX
Follow these steps:
- Open the OAuth URL in your browser to authenticate.
- When authenticated, copy the cookie value named
id
, you may need to use DevTools. - Set the token typing in your terminal: doky auth token
Code:
1 2 |
|
Result:
'https://login.docker.com/authorize/?client_id=XXXXXX&nonce=XXXXXX&redirect_uri=XXXXXX&response_type=code&scope=XXXXXX&state=XXXXXX'
It's not yet possible to automate authentication :(
Unfortunately, no way was found to wait for authentication to complete or even obtain the necessary authentication credentials so that it could be fully automated.
If you find a way that isn't as complicated as setting up a proxy, using webdrivers or browser extensions, feel free to open a pull request or an issue to discuss it.
Configuring authentication token and getting authentication information
After authenticating to Play With Docker, copy the cookie value named id
and insert it below:
Example
Usage:
$ doky auth token <YOUR-TOKEN-HERE> && doky auth me
Result:
Token saved successfully!
Try to run doky auth me to check your session.
Congratulations! You are logged :)
This is your authentication user informations:
- id: XXXXXX
- name: d3cryptofc
- provider_user_id: 1000XXX
- avatar: https://avatars.io/twitter/d3cryptofc
- provider: docker
- email: d3cryptofc@gmail.com
- banned: False
Code:
1 2 |
|
... but this alone does not guarantee that you are logged in, to find out, do this:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Result:
{
'id': 'XXXXXX',
'name': 'd3cryptofc',
'provider_user_id': '1000XXX',
'avatar': 'https://avatars.io/twitter/d3cryptofc',
'provider': 'docker',
'email': 'd3cryptofc@gmail.com',
'banned': False
}