Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal description in dev docs for auth-app token generation via API necessary #10605

Closed
mmattel opened this issue Nov 19, 2024 · 2 comments · Fixed by #10620
Closed

Minimal description in dev docs for auth-app token generation via API necessary #10605

mmattel opened this issue Nov 19, 2024 · 2 comments · Fixed by #10620

Comments

@mmattel
Copy link
Contributor

mmattel commented Nov 19, 2024

Referencing: #10292 (comment) and #10292 (comment)

We have a minimal auth-app via API documentation, just saying that there is an endpoint.

We should add some basic documentation as described in the linked issue how the endpoint is used.

@micbar @2403905

@mmattel mmattel changed the title Minimal description in dev docs for auth-app token generation necessary Minimal description in dev docs for auth-app token generation via API necessary Nov 19, 2024
@mmattel
Copy link
Contributor Author

mmattel commented Nov 20, 2024

Examples so we dont forget:
Note that auth basic is here only a placeholder/dev for a full bearer except if otherwise configured.

List tokens:
curl --location --request GET 'https://localhost:9200/auth-app/tokens' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ZWluc3RlaW46cmVsYXRpdml0eQ=='

Create token:
curl --location --request POST 'https://localhost:9200/auth-app/tokens?expiry=2m' \
--header 'Accept: application/json' \
--header 'Authorization: Basic ZWluc3RlaW46cmVsYXRpdml0eQ=='

Delete token:
curl --location --request DELETE 'https://localhost:9200/auth-app/tokens?token=%242a%2411%24hT5F3WidzRcz5yWIz1TGdu6w3QEbozGdKO9zTpdyV6zWpuloQi7Xe' \
--header 'Accept: application/json' \
--header 'Authorization: Basic ZWluc3RlaW46cmVsYXRpdml0eQ=='

User admin creates the token for user einstein.
https://owncloud.dev/services/auth-app/#via-impersonation-api
The auth-app service provides an Impersonation API to create (POST) tokens at /auth-app/tokens.

curl --location --request POST 'https://localhost:9200/auth-app/tokens?userID=4c510ada-c86b-4815-8820-42cdf82c3d51&userName=einstein&expiry=4h' \
--header 'Accept: application/json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='

@micbar
Copy link
Contributor

micbar commented Nov 21, 2024

Referencing #9755 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants