openapi: 3.2.0 info: title: Fusio Authorization API description: Self-Hosted API Management for Builders. version: '1' servers: - url: https://demo.fusio-project.org tags: - name: Authorization paths: /authorization/whoami: get: tags: - Authorization description: Returns user data of the current authenticated user operationId: authorization.getWhoami responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Backend_User' 4XX: description: '' content: application/json: schema: $ref: '#/components/schemas/Common_Message' 5XX: description: '' content: application/json: schema: $ref: '#/components/schemas/Common_Message' security: - app: - authorization summary: Authorization get whoami x-summary-source: derived /authorization/revoke: post: tags: - Authorization description: Revoke the access token of the current authenticated user operationId: authorization.revoke responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Common_Message' 4XX: description: '' content: application/json: schema: $ref: '#/components/schemas/Common_Message' 5XX: description: '' content: application/json: schema: $ref: '#/components/schemas/Common_Message' security: - app: - authorization summary: Authorization revoke x-summary-source: derived components: schemas: Common_Metadata: type: object additionalProperties: type: string Backend_Token: description: This object represents a token, this an access token which was requested by a user type: object properties: id: description: Unique identifier for the object type: integer status: description: Status of the object either 1 = active or 2 = deleted type: integer name: type: string scopes: type: array items: type: string ip: type: string expire: type: string format: date-time date: type: string format: date-time Backend_User: description: This object represents a user type: object properties: id: description: Unique identifier for the object type: integer roleId: description: A role which is assigned to the user type: integer planId: description: A plan which is assigned to the user type: integer status: description: Status of the object either 1 = active, 2 = disabled or 0 = deleted type: integer name: description: Unique name of the object type: string email: description: The email address of the user type: string points: description: Points assigned to the user type: integer scopes: description: List of scopes which are assigned to the user type: array items: type: string apps: type: array items: $ref: '#/components/schemas/Backend_App' metadata: $ref: '#/components/schemas/Common_Metadata' date: description: The insert date type: string format: date-time Backend_App: description: This object represents an app to access the API on-behalf of a user type: object properties: id: description: Unique identifier for the object type: integer userId: type: integer status: description: Status of the object either 1 = active, 2 = pending, 3 = deactivated or 4 = deleted type: integer name: description: Unique name of the object type: string url: description: Url where the app is hosted type: string parameters: description: Optional URL-encoded parameters of the app i.e. foo=bar&bar=foo type: string appKey: description: The app key also known as client id which is generated on creation type: string appSecret: description: The app secret also known as client secret which is generated on creation type: string metadata: $ref: '#/components/schemas/Common_Metadata' date: description: The create date of this object type: string format: date-time scopes: description: A list of assigned scopes for this app type: array items: type: string tokens: description: A list of tokens which are assigned to this app type: array items: $ref: '#/components/schemas/Backend_Token' Common_Message: description: Common error message type: object properties: success: type: boolean message: type: string id: type: string securitySchemes: app: type: oauth2 flows: clientCredentials: tokenUrl: https://demo.fusio-project.org/authorization/token refreshUrl: https://demo.fusio-project.org/authorization/token scopes: authorization: '' openid: OpenID scope authorizationCode: authorizationUrl: https://demo.fusio-project.org/authorization/authorize tokenUrl: https://demo.fusio-project.org/authorization/token refreshUrl: https://demo.fusio-project.org/authorization/token scopes: authorization: '' openid: OpenID scope