Skip to content

Commit

Permalink
Merge pull request #30 from morinoparty/develop
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
Nlkomaru authored Apr 27, 2024
2 parents 900010d + 5482c48 commit e5765fa
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 34 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: pip install mkdocs-material
- run: |
pip install mkdocs-material
pip install mkdocs-static-i18n[material]
pip install mkdocs-render-swagger-plugin
- run: git pull
- run: mkdocs gh-deploy --config-file ./docs/mkdocs.yml
59 changes: 59 additions & 0 deletions docs/docs/assets/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
openapi: 3.1.0
info:
title: "MineAuth"
description: |
This is the MineAuth API documentation.<br>
This makes user access to self information on minecraft.
license:
name: CC0-1.0
url: "https://creativecommons.org/publicdomain/zero/1.0/"
version: "1.0.0"

servers:
- url: "http://localhost:8080"
description: "Local server"
- url: "https://api.example.com"
description: "Production server"

components:
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: /oauth2/authorize
tokenUrl: /oauth2/token
refreshUrl: /oauth2/token
scopes:
profile: Grants read access for my profile
all: Grants read access for my resources

security:
- oauth2: [ openid, profile, all ]

paths:
/oauth2/userinfo:
get:
summary: Get user information
security:
- oauth2: [ profile ]
/oauth2/revoke:
post:
summary: Revoke access token
security:
- oauth2: [ all ]
parameters:
- name: token
in: query
required: true
schema:
type: string
/oauth2/introspect:
post:
summary: Introspect access token
parameters:
- name: token
in: query
required: true
schema:
type: string
22 changes: 0 additions & 22 deletions docs/docs/developers/endpoint.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/docs/developers/memo.md

This file was deleted.

26 changes: 26 additions & 0 deletions docs/docs/en/developers/endpoint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Endpoints
This is an endpoint list for OAuth2.0 and OpenID Connect (OIDC) for Moripa API.

## Endpoints
### OAuth2.0

- [x] Authorization
endpoint `/oauth2/authorize` [RFC 6749 4.1.1](https://datatracker.ietf.org/doc/html/rfc6749.html#section-4.1.1)
- [x] Token
endpoint `/oauth2/token` [RFC 6749 4.1.3](https://datatracker.ietf.org/doc/html/rfc6749.html#section-4.1.3)
- [ ] Introspection
endpoint `/oauth2/introspect` [RFC 7662](https://datatracker.ietf.org/doc/html/rfc7662.html#section-2.1)
- [ ] Revocation
endpoint `/oauth2/revoke` [RFC 7009](https://datatracker.ietf.org/doc/html/rfc7009.html#section-2.1)


### OpenID Connect (OIDC)

- [ ] Discovery endpoint `/.well-known/openid-configuration`
- [x] JWKs endpoint `/.well-known/jwks.json`
- [x] UserInfo
endpoint `/oauth2/userinfo` [OIDC Core 5.3](https://openid-foundation-japan.github.io/openid-connect-core-1_0.ja.html#UserInfo)

### Plugin

- Plugin endpoint `/api/v1/plugin/<pluginName>/*`
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions docs/docs/index.md → docs/docs/en/index.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Welcome to Moripa-API Docs


3 changes: 3 additions & 0 deletions docs/docs/en/openAPI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# OpenAPI

!!swagger ../assets/documentation.yaml!!
18 changes: 15 additions & 3 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ theme:
- content.code.copy
palette:
- scheme: default
primary : green
primary: green
accent: light green
toggle:
icon: material/brightness-7
name: Switch to dark mode
- scheme: slate
primary : green
primary: green
accent: light green
toggle:
icon: material/brightness-4
Expand All @@ -29,8 +29,20 @@ markdown_extensions:
- pymdownx.tasklist:
custom_checkbox: true
plugins:
- render_swagger:
allow_arbitrary_locations: true
- search:
lang: ja
lang: en
- i18n:
docs_structure: folder
languages:
- locale: en
default: true
name: English
build: true
- locale: ja
name: 日本語
build: true
repo_url: https://github.com/morinoparty/Moripa-API
repo_name: Moripa-API
copyright: No Rights Reserved.

0 comments on commit e5765fa

Please sign in to comment.