-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.json
1 lines (1 loc) · 2.36 KB
/
openapi.json
1
{"openapi":"3.1.0","info":{"title":"serve-actix-diesel-auth-scaffold","description":"","license":{"name":"Apache-2.0 OR MIT OR CC0"},"version":"0.0.1"},"paths":{"/api":{"get":{"summary":"Versions of this package and its first-party dependencies","operationId":"version","responses":{}}},"/api/token":{"post":{"summary":"Generate a token for a grant flow.\nImplements https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3","operationId":"token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"description":"Token created"},"400":{"description":"Unauthorized User"},"404":{"description":"Not Found User"},"500":{"description":"Bad Request"}}}},"/secured/logout":{"post":{"summary":"Logout a user (uses provided Bearer token from Header)","operationId":"logout","responses":{"200":{"description":""}},"security":[{"password":[]}]}},"/secured/secret":{"get":{"summary":"Shows secret to authenticated user (uses provided Bearer token from Header)","operationId":"secret","responses":{"200":{"description":"secret endpoint"}},"security":[{"password":[]}]}}},"components":{"schemas":{"GrantType":{"type":"string","enum":["password","authorization_code","client_credentials","refresh_token"]},"TokenRequest":{"type":"object","required":["grant_type"],"properties":{"client_id":{"type":["string","null"],"description":"optional client ID (as used, for example, in RFC6749's non password non refresh grant flow)","example":null},"client_secret":{"type":["string","null"],"description":"optional client secret (as used, e.g., in RFC6749's non (password|refresh) grant flow)","example":null},"grant_type":{"$ref":"#/components/schemas/GrantType","description":"RFC6749 grant type"},"password":{"type":["string","null"],"description":"optional password (as used, for example, in RFC6749's password grant flow)","example":"pass0"},"refresh_token":{"type":["string","null"],"description":"optional refresh token (as used, for example, in RFC6749's refresh grant flow)","example":null},"username":{"type":["string","null"],"description":"optional username (as used, for example, in RFC6749's password grant flow)","example":"user0"}}}},"securitySchemes":{"password":{"type":"oauth2","flows":{"password":{"tokenUrl":"/api/token","scopes":{}}}}}},"tags":[{"name":"serve-actix-diesel-auth-scaffold","description":""}]}