Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3217,6 +3217,103 @@ paths:
default:
$ref: "#/components/responses/ServerError"

/auth/get-token/start:
get:
tags:
- auth
- experimental
security: [] # This a way to log in, no auth available.
operationId: getTokenRedirect
summary: start acquiring a token by logging in on a browser
responses:
303:
description: login on this page, await results on the mailbox URL
headers:
Location:
schema:
type: string
description: open this URL on the browser
X-LakeFS-Mailbox:
schema:
type: string
description: GET the token from this mailbox. Keep the mailbox SECRET!
401:
$ref: "#/components/responses/Unauthorized"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also need the 404 case here?

429:
description: too many requests
501:
description: Not implemented in this edition.
$ref: "#/components/responses/NotImplemented"
default:
$ref: "#/components/responses/ServerError"

/auth/get-token/mailboxes/{mailbox}:
parameters:
- in: path
name: mailbox
required: true
schema:
type: string
description: mailbox returned by getTokenRedirect
get:
tags:
- auth
- experimental
security: [] # This a way to log in, no auth available.
operationId: getTokenFromMailbox
summary: receive the token after user has authenticated on redirect URL.
responses:
200:
description: user successfully logged in
content:
application/json:
schema:
$ref: "#/components/schemas/AuthenticationToken"
401:
description: bad mailbox or user has not logged in yet
$ref: "#/components/responses/Unauthorized"
404:
description: not found or user has not logged in yet
$ref: "#/components/responses/NotFound"
429:
description: too many requests
501:
description: not implemented in this edition.
$ref: "#/components/responses/NotImplemented"
default:
$ref: "#/components/responses/ServerError"

/auth/get-token/release-token/{loginRequestToken}:
parameters:
- in: path
# The mailbox is secret. It is identified by the loginRequestToken - a JWT which is
# _not_ secret. So this JWT can safely go in a header.
name: loginRequestToken
required: true
schema:
type: string
maxLength: 1024
description: login request token returned by getTokenRedirect.
get: # Called by opening a URL on the browser!
tags:
- auth
- experimental
operationId: releaseTokenToMailbox
summary: release a token for the current (authenticated) user to the mailbox of this login request.
responses:
204:
description: token released
401:
description: bad token or user has not logged in yet
$ref: "#/components/responses/Unauthorized"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you also need the 404 case here?

429:
description: too many requests
501:
description: not implemented in this edition.
$ref: "#/components/responses/NotImplemented"
default:
$ref: "#/components/responses/ServerError"

/repositories:
get:
tags:
Expand Down
6 changes: 6 additions & 0 deletions clients/java/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

138 changes: 138 additions & 0 deletions clients/java/api/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading