Skip to content

Commit

Permalink
Add github pages documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
phavekes committed Oct 3, 2023
1 parent 80460e9 commit 806a0e8
Show file tree
Hide file tree
Showing 10 changed files with 3,265 additions and 17 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: make-doc

# Triggers the workflow on push or pull request events
on: [push, pull_request] # yamllint disable-line

jobs:
test-redoc:
runs-on: ubuntu-latest
name: Test documentation and generate openapi html documentation
steps:
- name: Checkout
uses: actions/checkout@v3

- name: lint markdown files
uses: nosborn/[email protected]
with:
files: .

- name: lint yaml files
uses: ibiqlik/action-yamllint@v3

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: 'maven'
- name: Set up MySQL
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: '8.0'
- run: |
mysql -uroot -h127.0.0.1 -e \
"CREATE DATABASE access CHARACTER SET utf8mb4 \
COLLATE utf8mb4_0900_ai_ci;"
- run: |
mysql -uroot -h127.0.0.1 -e \
"CREATE USER 'access'@'localhost' IDENTIFIED BY 'secret';";
- run: |
mysql -uroot -h127.0.0.1 -e \
"GRANT ALL privileges ON access.* TO 'access'@'localhost';"
- name: Generate openapi.json
run: mvn verify -DskipTests=true

- name: Test api-specs with redoc-cli
uses: seeebiii/redoc-cli-github-action@v10
with:
args: 'bundle server/target/openapi.json -t template.hbs -o docs/api/index.html'

- name: check result
run: |
ls -al docs/api/
test -f docs/api/index.html || (echo "Missing docs/index.html from previous step." && exit 1)
- name: Commit files if the html has changed
run: |
git config user.name github-actions
git config user.email [email protected]
git add docs/api/index.html
git diff-index --quiet HEAD || git commit -m "Update github page"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
18 changes: 18 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# MD013/line-length - Line length
MD013:
# Number of characters
line_length: 160
# Number of characters for headings
heading_line_length: 80
# Number of characters for code blocks
code_block_line_length: 80
# Include code blocks
code_blocks: false
# Include tables
tables: false

# MD033/no-inline-html - Inline HTML
MD033:
# Allowed elements
allowed_elements: [br]
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*/node_modules/
37 changes: 21 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Openconext-Invite
# invite-server

[![Build Status](https://github.com/OpenConext/OpenConext-Access/actions/workflows/actions.yml/badge.svg)](https://github.com/SOpenConext/OpenConext-Access/actions/workflows/actions.yml/badge.svg)
[![codecov](https://codecov.io/gh/OpenConext/OpenConext-Access/branch/main/graph/badge.svg?token=HZ7ES3TLQ9)](https://codecov.io/gh/OpenConext/OpenConext-Access)
Expand Down Expand Up @@ -41,37 +40,42 @@ To build and deploy (the latter requires credentials in your maven settings):
mvn clean deploy
```

### [Endpoints](#endpoint)
### [Endpoints](#endpoints)

https://access.test2.surfconext.nl/ui/swagger-ui/index.html
<https://access.test2.surfconext.nl/ui/swagger-ui/index.html>

https://mock.test2.surfconext.nl/
<https://mock.test2.surfconext.nl/>

https://welcome.test2.surfconext.nl/
<https://welcome.test2.surfconext.nl/>

https://access.test2.surfconext.nl/
<https://access.test2.surfconext.nl/>

### [Mock](#mock)

If you want to use the mock-provisioning, add the following metadata in Manage.

SCIM:
```

```json
"provisioning_type": "scim",
"scim_url": "https://mock.test2.surfconext.nl/api/scim/v2",
"scim_user": "user",
"scim_password": "secret",
"scim_update_role_put_method": true
```

eVA
```

```json
"provisioning_type": "eva",
"eva_token": "secret",
"eva_guest_account_duration": 30
"eva_url": "https://mock.test2.surfconext.nl/eva",
```

Graph
```

```json
"provisioning_type": "graph",
"graph_url": "https://mock.test2.surfconext.nl/graph/users",
"graph_client_id" : "client_id",
Expand All @@ -80,20 +84,21 @@ Graph
"graph_tenant": "tenant"
```

### [Local endpoints](#local-endpoint)
### [Local endpoints](#local-endpoints)

Login with Mujina IdP and user `admin` to become super-user in the local environment

http://localhost:8080/ui/swagger-ui/index.html
<http://localhost:8080/ui/swagger-ui/index.html>

http://localhost:8081/
<http://localhost:8081/>

http://localhost:4000
<http://localhost:4000>

http://localhost:3000
<http://localhost:3000>

### [Institution Admin](#institution-admin)

To become an institution admin in invite, add the following values as `eduPersonEntitlements` using Mujina:
* urn:mace:surfnet.nl:surfnet.nl:sab:organizationGUID:ad93daef-0911-e511-80d0-005056956c1a
* urn:mace:surfnet.nl:surfnet.nl:sab:role:SURFconextverantwoordelijke

- urn:mace:surfnet.nl:surfnet.nl:sab:organizationGUID:ad93daef-0911-e511-80d0-005056956c1a
- urn:mace:surfnet.nl:surfnet.nl:sab:role:SURFconextverantwoordelijke
Loading

0 comments on commit 806a0e8

Please sign in to comment.