Skip to content

Commit

Permalink
Merge pull request #8 from mulesoft-consulting/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
soufi authored Apr 26, 2021
2 parents 0215416 + 3e9785a commit d06a126
Show file tree
Hide file tree
Showing 42 changed files with 10,178 additions and 27 deletions.
4 changes: 4 additions & 0 deletions authorization/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ configuration.go
docs/Credentials.md
docs/DefaultApi.md
docs/InlineResponse200.md
docs/InlineResponse2001.md
docs/UserPwdCredentials.md
git_push.sh
go.mod
go.sum
model_credentials.go
model_inline_response_200.go
model_inline_response_200_1.go
model_user_pwd_credentials.go
response.go
utils.go
7 changes: 5 additions & 2 deletions authorization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,20 @@ ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables

## Documentation for API Endpoints

All URIs are relative to *https://anypoint.mulesoft.com/accounts/api/v2*
All URIs are relative to *https://anypoint.mulesoft.com/accounts*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**Oauth2TokenPost**](docs/DefaultApi.md#oauth2tokenpost) | **Post** /oauth2/token | Returns access token
*DefaultApi* | [**ApiV2Oauth2TokenPost**](docs/DefaultApi.md#apiv2oauth2tokenpost) | **Post** /api/v2/oauth2/token | Returns access token
*DefaultApi* | [**LoginPost**](docs/DefaultApi.md#loginpost) | **Post** /login | Returns access token


## Documentation For Models

- [Credentials](docs/Credentials.md)
- [InlineResponse200](docs/InlineResponse200.md)
- [InlineResponse2001](docs/InlineResponse2001.md)
- [UserPwdCredentials](docs/UserPwdCredentials.md)


## Documentation For Authorization
Expand Down
62 changes: 59 additions & 3 deletions authorization/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ info:
version: 1.0.0
servers:
- description: Anypoint Cloudhub
url: https://anypoint.mulesoft.com/accounts/api/v2/
url: https://anypoint.mulesoft.com/accounts/
- description: Anypoint Cloudhub EU
url: https://eu1.anypoint.mulesoft.com/accounts/api/v2/
url: https://eu1.anypoint.mulesoft.com/accounts/
paths:
/oauth2/token:
/api/v2/oauth2/token:
post:
description: Authenticates a connected app and returns access token
requestBody:
Expand All @@ -29,6 +29,26 @@ paths:
$ref: '#/components/schemas/inline_response_200'
description: Success response
summary: Returns access token
/login:
post:
description: Authenticates a user and returns access token
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/userPwdCredentials'
description: Request body containing credentials
required: true
responses:
"401":
description: Access token is missing or invalid
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/inline_response_200_1'
description: Success response
summary: Returns access token
components:
responses:
UnauthorizedError:
Expand All @@ -39,6 +59,12 @@ components:
schema:
$ref: '#/components/schemas/inline_response_200'
description: Success response
SuccessAuthUserPwd:
content:
application/json:
schema:
$ref: '#/components/schemas/inline_response_200_1'
description: Success response
schemas:
credentials:
properties:
Expand All @@ -55,6 +81,17 @@ components:
title: the connected app client_secret
type: string
type: object
userPwdCredentials:
properties:
username:
default: ""
title: username
type: string
password:
default: ""
title: password
type: string
type: object
inline_response_200:
example:
access_token: e4abe472725d-93b3-426e-8ca7-5a45636b
Expand All @@ -74,3 +111,22 @@ components:
title: token type
type: string
type: object
inline_response_200_1:
example:
access_token: e4abe472725d-93b3-426e-8ca7-5a45636b
redirectUrl: /home/
token_type: brearer
properties:
access_token:
example: e4abe472725d-93b3-426e-8ca7-5a45636b
title: Authorization token
type: string
redirectUrl:
example: /home/
title: redirect url
type: string
token_type:
example: brearer
title: token type
type: string
type: object
134 changes: 123 additions & 11 deletions authorization/api_default.go

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

4 changes: 2 additions & 2 deletions authorization/configuration.go

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

Loading

0 comments on commit d06a126

Please sign in to comment.