You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/reference/api/hub/latest.yaml
+91-9Lines changed: 91 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,52 @@ tags:
50
50
Additionally, similar to the Docker Hub UI features, API endpoint responses may vary depending on your plan (Personal, Pro, or Team) and your account's permissions.
51
51
52
52
To learn more about the features available in each plan and to upgrade your existing plan, see [Docker Pricing](https://www.docker.com/pricing).
53
+
This section describes the different types of authentication available.
54
+
55
+
# Types
56
+
57
+
These are the types of authentication available for the Docker Hub API.
58
+
59
+
Each authentication type should be used with the [Create access token](#tag/authentication-api/operation/AuthCreateAccessToken)
60
+
route to obtain a bearer token to be used.
61
+
62
+
## Password
63
+
Using a username and password is the most powerful, yet least secure way
64
+
to authenticate with Docker as a user. It allows for access to resources
65
+
for the user without scopes.
66
+
67
+
_In general, it is recommended to use a personal access token (PAT) instead._
68
+
69
+
_**This is not available if your organization has SSO enforced.**_
70
+
71
+
## Personal Access Token (PAT)
72
+
Using a username and PAT is the most secure way to authenticate with
73
+
Docker as a user. PATs are scoped to specific resources and scopes.
74
+
75
+
Currently a PAT is a more secure password due to limited functionality,
76
+
but in the future we may add fine-grained access like organization
77
+
access tokens for enhanced usage and security.
78
+
79
+
## Organization Access Token (OAT)
80
+
Organization access tokens are scoped to specific resources and scopes
81
+
within an organization and are managed by organization owners.
82
+
83
+
These tokens are meant for automation and are not meant to be used by
84
+
users.
85
+
86
+
# Labels
87
+
88
+
These labels will show up on routes in this document that allow for bearer
89
+
tokens issued from them to be used.
90
+
91
+
<span class="pat"></span>
92
+
<span class="oat"></span>
93
+
- name: authentication-api
94
+
x-displayName: Authentication
95
+
description: |
96
+
The authentication endpoints allow you to authenticate with Docker Hub APIs.
97
+
98
+
For more information, see [Authentication](#tag/authentication).
53
99
- name: access-tokens
54
100
x-displayName: Personal Access Tokens
55
101
description: |
@@ -110,7 +156,7 @@ paths:
110
156
/v2/users/login:
111
157
post:
112
158
tags:
113
-
- authentication
159
+
- authentication-api
114
160
summary: Create an authentication token
115
161
operationId: PostUsersLogin
116
162
security: []
@@ -123,7 +169,7 @@ paths:
123
169
_**As of September 16, 2024, this route requires a personal access token (PAT) instead of a password if your organization has SSO enforced.**_
0 commit comments