Skip to content

Commit

Permalink
ci: add docs format checking (ory#2099)
Browse files Browse the repository at this point in the history
Co-authored-by: aeneasr <[email protected]>
  • Loading branch information
zepatrik and aeneasr authored Oct 7, 2020
1 parent 434a3b1 commit 70c7998
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 310 deletions.
35 changes: 23 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ orbs:
sdk: ory/[email protected]
changelog: ory/[email protected]
nancy: ory/[email protected]
docs: ory/[email protected].6
golangci: ory/[email protected].7
docs: ory/[email protected].8
golangci: ory/[email protected].8

jobs:
# test-legacy-migrations:
Expand Down Expand Up @@ -125,6 +125,17 @@ jobs:
- run: ./test/e2e/circle-ci.bash << parameters.flavor >>
- run: ./test/e2e/circle-ci.bash << parameters.flavor >>-jwt

validate:
docker:
- image: circleci/golang:1.15-node
environment:
GO111MODULE: 'on'
working_directory: /go/src/github.com/ory/hydra
steps:
- checkout
- golangci/lint
- docs/check-format

workflows:
bdt:
jobs:
Expand Down Expand Up @@ -154,14 +165,14 @@ workflows:
# only: /.*/
# END - Test legacy migrations

- golangci/lint:
- validate:
filters:
tags:
only: /.*/
- nancy/test:
filters:
tags:
only: /.*/
filters:
tags:
only: /.*/
- test:
filters:
tags:
Expand Down Expand Up @@ -208,7 +219,7 @@ workflows:
requires:
- nancy/test
- test
- golangci/lint
- validate
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
Expand All @@ -227,7 +238,7 @@ workflows:
requires:
- nancy/test
- test
- golangci/lint
- validate
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
Expand All @@ -244,7 +255,7 @@ workflows:
requires:
- nancy/test
- test
- golangci/lint
- validate
- sdk/generate
- goreleaser/release
- docs/build
Expand All @@ -257,12 +268,12 @@ workflows:
requires:
- nancy/test
- test
- golangci/lint
- validate
- docs/build:
requires:
- nancy/test
- test
- golangci/lint
- validate
filters:
tags:
only: /.*/
Expand All @@ -280,7 +291,7 @@ workflows:
- goreleaser/test
- nancy/test
- test
- golangci/lint
- validate
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
Expand Down
3 changes: 0 additions & 3 deletions docs/docs/concepts/consent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ request! For more details about the implementation check the
</TabItem>
<TabItem value="curl">
```shell script
$ curl \
"http://127.0.0.1:4445/oauth2/auth/requests/consent?consent_challenge=7bb518c4eec2454dbb289f5fdb4c0ee2"
Expand All @@ -170,7 +169,6 @@ examples using the ORY Hydra SDK in different languages.
</TabItem>
<TabItem value="json">


```json
{
"challenge": "f633e49d56bc40e0a876ac8242eb9891",
Expand Down Expand Up @@ -217,7 +215,6 @@ examples using the ORY Hydra SDK in different languages.
</TabItem>
</Tabs>


The way you collect the consent information from the End-User is up to you. In
most cases, you will show an HTML form similar to:

Expand Down
6 changes: 0 additions & 6 deletions docs/docs/concepts/login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ correct endpoint for your interactions.
</TabItem>
<TabItem value="html">


```html
<a
href="https://<hydra-public>/oauth2/auth?client_id=...&response_type=...&scope=..."/>
Expand All @@ -92,7 +91,6 @@ Login in with ORY Hydra</a>
</TabItem>
<TabItem value="js">


```js
// ...
window.location.href =
Expand All @@ -102,7 +100,6 @@ window.location.href =
</TabItem>
</Tabs>


## Redirection to the Login Endpoint

The next task for ORY Hydra is to know the user of the request. To achieve that,
Expand Down Expand Up @@ -205,7 +202,6 @@ more details about the implementation check the
</TabItem>
<TabItem value="curl">
```
curl "http://127.0.0.1:4445/oauth2/auth/requests/login?login_challenge=7bb518c4eec2454dbb289f5fdb4c0ee2"
```
Expand All @@ -216,7 +212,6 @@ examples using the ORY Hydra SDK in different languages.
</TabItem>
<TabItem value="json">
```json
{
"challenge": "7bb518c4eec2454dbb289f5fdb4c0ee2",
Expand Down Expand Up @@ -255,7 +250,6 @@ examples using the ORY Hydra SDK in different languages.
</TabItem>
</Tabs>


The way you authenticate the End-User is up to you. In most cases, you will show
an HTML form similar to:

Expand Down
9 changes: 0 additions & 9 deletions docs/docs/guides/consent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ to ORY Hydra's Admin Endpoint!
</TabItem>
<TabItem value="node">


:::note

Check out our
Expand Down Expand Up @@ -124,7 +123,6 @@ router.get('/get', csrfProtection, (req, res, next) => {
</TabItem>
<TabItem value="html">


```html
<form action="/consent" method="POST">
<input type="hidden" name="challenge" value="#{ challenge }" />
Expand Down Expand Up @@ -162,7 +160,6 @@ router.get('/get', csrfProtection, (req, res, next) => {
</TabItem>
</Tabs>


## Accepting the Consent Request

<Tabs
Expand All @@ -172,7 +169,6 @@ router.get('/get', csrfProtection, (req, res, next) => {
]}>
<TabItem value="node">


:::note

Check out our
Expand Down Expand Up @@ -220,7 +216,6 @@ hydraAdmin
</TabItem>
</Tabs>


## Rejecting the Consent Request

<Tabs
Expand All @@ -230,7 +225,6 @@ hydraAdmin
]}>
<TabItem value="node">


:::note

Check out our
Expand All @@ -256,7 +250,6 @@ hydraAdmin
</TabItem>
</Tabs>


## Complete Endpoint

<Tabs
Expand All @@ -266,7 +259,6 @@ hydraAdmin
]}>
<TabItem value="node">


:::note

Check out our
Expand Down Expand Up @@ -355,4 +347,3 @@ router.post('/consent', csrfProtection, (req, res, next) => {

</TabItem>
</Tabs>

7 changes: 0 additions & 7 deletions docs/docs/guides/login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ to ORY Hydra's Admin Endpoint!
</TabItem>
<TabItem value="node">


:::note

Check out our
Expand Down Expand Up @@ -103,7 +102,6 @@ router.get('/login', csrfProtection, (req, res, next) => {
</TabItem>
<TabItem value="html">


```html
<form action="/login" method="POST">
<input type="hidden" name="_csrf" value="{{ csrfToken }}" />
Expand All @@ -121,7 +119,6 @@ router.get('/login', csrfProtection, (req, res, next) => {
</TabItem>
</Tabs>


## Accepting the Login Request

<Tabs
Expand All @@ -131,7 +128,6 @@ router.get('/login', csrfProtection, (req, res, next) => {
]}>
<TabItem value="node">


:::note

Check out our
Expand Down Expand Up @@ -190,7 +186,6 @@ router.post('/login', csrfProtection, (req, res, next) => {
</TabItem>
</Tabs>


## Rejecting the Login Request

<Tabs
Expand All @@ -200,7 +195,6 @@ router.post('/login', csrfProtection, (req, res, next) => {
]}>
<TabItem value="node">


```typescript
// You can deny the login request at any point - for example if the system is currently undergoing maintenance
// or the user has been banned, is not allowed to use OAuth2 flows, and so on:
Expand All @@ -217,4 +211,3 @@ hydraAdmin

</TabItem>
</Tabs>

7 changes: 0 additions & 7 deletions docs/docs/guides/logout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ to ORY Hydra's Admin Endpoint!
</TabItem>
<TabItem value="node">


:::note

Check out our
Expand Down Expand Up @@ -95,7 +94,6 @@ router.get('/', csrfProtection, (req, res, next) => {
</TabItem>
<TabItem value="html">


```html
<form action="/logout" method="POST">
<input type="hidden" name="_csrf" value="{{ .csrfToken }}" />
Expand All @@ -108,7 +106,6 @@ router.get('/', csrfProtection, (req, res, next) => {
</TabItem>
</Tabs>


## Accepting Logout

<Tabs
Expand All @@ -118,7 +115,6 @@ router.get('/', csrfProtection, (req, res, next) => {
]}>
<TabItem value="node">


:::note

Check out our
Expand All @@ -145,7 +141,6 @@ router.post('/logout', csrfProtection, (req, res, next) => {
</TabItem>
</Tabs>


## Rejecting Logout

<Tabs
Expand All @@ -155,7 +150,6 @@ router.post('/logout', csrfProtection, (req, res, next) => {
]}>
<TabItem value="node">


:::note

Check out our
Expand All @@ -182,4 +176,3 @@ router.post('/logout', csrfProtection, (req, res, next) => {

</TabItem>
</Tabs>

Loading

0 comments on commit 70c7998

Please sign in to comment.