Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 801cad1

Browse files
committed
Merge branch '3522-users-1' into 3522-organizations-1
2 parents 5405c0c + 4667f07 commit 801cad1

File tree

8 files changed

+796
-7
lines changed

8 files changed

+796
-7
lines changed

coderd/apidoc/docs.go

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,6 +1798,173 @@ const docTemplate = `{
17981798
}
17991799
}
18001800
},
1801+
"/users/authmethods": {
1802+
"get": {
1803+
"security": [
1804+
{
1805+
"CoderSessionToken": []
1806+
}
1807+
],
1808+
"produces": [
1809+
"application/json"
1810+
],
1811+
"tags": [
1812+
"Users"
1813+
],
1814+
"summary": "Get authentication methods",
1815+
"operationId": "get-authentication-methods",
1816+
"responses": {
1817+
"200": {
1818+
"description": "OK",
1819+
"schema": {
1820+
"$ref": "#/definitions/codersdk.AuthMethods"
1821+
}
1822+
}
1823+
}
1824+
}
1825+
},
1826+
"/users/first": {
1827+
"get": {
1828+
"security": [
1829+
{
1830+
"CoderSessionToken": []
1831+
}
1832+
],
1833+
"produces": [
1834+
"application/json"
1835+
],
1836+
"tags": [
1837+
"Users"
1838+
],
1839+
"summary": "Check initial user created",
1840+
"operationId": "check-initial-user-created",
1841+
"responses": {
1842+
"200": {
1843+
"description": "OK",
1844+
"schema": {
1845+
"$ref": "#/definitions/codersdk.Response"
1846+
}
1847+
}
1848+
}
1849+
},
1850+
"post": {
1851+
"security": [
1852+
{
1853+
"CoderSessionToken": []
1854+
}
1855+
],
1856+
"consumes": [
1857+
"application/json"
1858+
],
1859+
"produces": [
1860+
"application/json"
1861+
],
1862+
"tags": [
1863+
"Users"
1864+
],
1865+
"summary": "Create initial user",
1866+
"operationId": "create-initial-user",
1867+
"parameters": [
1868+
{
1869+
"description": "First user request",
1870+
"name": "request",
1871+
"in": "body",
1872+
"required": true,
1873+
"schema": {
1874+
"$ref": "#/definitions/codersdk.CreateFirstUserRequest"
1875+
}
1876+
}
1877+
],
1878+
"responses": {
1879+
"201": {
1880+
"description": "Created",
1881+
"schema": {
1882+
"$ref": "#/definitions/codersdk.CreateFirstUserResponse"
1883+
}
1884+
}
1885+
}
1886+
}
1887+
},
1888+
"/users/login": {
1889+
"post": {
1890+
"security": [
1891+
{
1892+
"CoderSessionToken": []
1893+
}
1894+
],
1895+
"produces": [
1896+
"application/json"
1897+
],
1898+
"tags": [
1899+
"Authentication"
1900+
],
1901+
"summary": "Log in user",
1902+
"operationId": "log-in-user",
1903+
"parameters": [
1904+
{
1905+
"description": "Login request",
1906+
"name": "request",
1907+
"in": "body",
1908+
"required": true,
1909+
"schema": {
1910+
"$ref": "#/definitions/codersdk.LoginWithPasswordRequest"
1911+
}
1912+
}
1913+
],
1914+
"responses": {
1915+
"201": {
1916+
"description": "Created",
1917+
"schema": {
1918+
"$ref": "#/definitions/codersdk.LoginWithPasswordResponse"
1919+
}
1920+
}
1921+
}
1922+
}
1923+
},
1924+
"/users/oauth2/github/callback": {
1925+
"get": {
1926+
"security": [
1927+
{
1928+
"CoderSessionToken": []
1929+
}
1930+
],
1931+
"produces": [
1932+
"application/json"
1933+
],
1934+
"tags": [
1935+
"Users"
1936+
],
1937+
"summary": "OAuth 2.0 GitHub Callback",
1938+
"operationId": "oauth2-github-callback",
1939+
"responses": {
1940+
"307": {
1941+
"description": "Temporary Redirect"
1942+
}
1943+
}
1944+
}
1945+
},
1946+
"/users/oidc/callback": {
1947+
"get": {
1948+
"security": [
1949+
{
1950+
"CoderSessionToken": []
1951+
}
1952+
],
1953+
"produces": [
1954+
"application/json"
1955+
],
1956+
"tags": [
1957+
"Users"
1958+
],
1959+
"summary": "OpenID Connect Callback",
1960+
"operationId": "oidc-callback",
1961+
"responses": {
1962+
"307": {
1963+
"description": "Temporary Redirect"
1964+
}
1965+
}
1966+
}
1967+
},
18011968
"/users/{user}/workspace/{workspacename}": {
18021969
"get": {
18031970
"security": [
@@ -2995,6 +3162,20 @@ const docTemplate = `{
29953162
}
29963163
}
29973164
},
3165+
"codersdk.AuthMethods": {
3166+
"type": "object",
3167+
"properties": {
3168+
"github": {
3169+
"type": "boolean"
3170+
},
3171+
"oidc": {
3172+
"type": "boolean"
3173+
},
3174+
"password": {
3175+
"type": "boolean"
3176+
}
3177+
}
3178+
},
29983179
"codersdk.AuthorizationCheck": {
29993180
"description": "AuthorizationCheck is used to check if the currently authenticated user (or the specified user) can do a given action to a given set of objects.",
30003181
"type": "object",
@@ -3082,6 +3263,41 @@ const docTemplate = `{
30823263
}
30833264
}
30843265
},
3266+
"codersdk.CreateFirstUserRequest": {
3267+
"type": "object",
3268+
"required": [
3269+
"email",
3270+
"password",
3271+
"username"
3272+
],
3273+
"properties": {
3274+
"email": {
3275+
"type": "string"
3276+
},
3277+
"password": {
3278+
"type": "string"
3279+
},
3280+
"trial": {
3281+
"type": "boolean"
3282+
},
3283+
"username": {
3284+
"type": "string"
3285+
}
3286+
}
3287+
},
3288+
"codersdk.CreateFirstUserResponse": {
3289+
"type": "object",
3290+
"properties": {
3291+
"organization_id": {
3292+
"type": "string",
3293+
"format": "uuid"
3294+
},
3295+
"user_id": {
3296+
"type": "string",
3297+
"format": "uuid"
3298+
}
3299+
}
3300+
},
30853301
"codersdk.CreateOrganizationRequest": {
30863302
"type": "object",
30873303
"required": [
@@ -3705,6 +3921,32 @@ const docTemplate = `{
37053921
}
37063922
}
37073923
},
3924+
"codersdk.LoginWithPasswordRequest": {
3925+
"type": "object",
3926+
"required": [
3927+
"email",
3928+
"password"
3929+
],
3930+
"properties": {
3931+
"email": {
3932+
"type": "string"
3933+
},
3934+
"password": {
3935+
"type": "string"
3936+
}
3937+
}
3938+
},
3939+
"codersdk.LoginWithPasswordResponse": {
3940+
"type": "object",
3941+
"required": [
3942+
"session_token"
3943+
],
3944+
"properties": {
3945+
"session_token": {
3946+
"type": "string"
3947+
}
3948+
}
3949+
},
37083950
"codersdk.OAuth2Config": {
37093951
"type": "object",
37103952
"properties": {

0 commit comments

Comments
 (0)