Skip to content

Commit

Permalink
chore: format and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Apr 5, 2021
1 parent 638562c commit 380fc94
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 302 deletions.
4 changes: 0 additions & 4 deletions docs/docs/concepts/consent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,11 @@ request! For more details about the implementation check the
]}>
<TabItem value="ui">
![Exemplary OAuth 2.0 Consent Screen](../images/consent-endpoint.png)
</TabItem>
<TabItem value="curl">
```shell script
$ curl \
"http://127.0.0.1:4445/oauth2/auth/requests/consent?consent_challenge=7bb518c4eec2454dbb289f5fdb4c0ee2"
Expand All @@ -169,7 +167,6 @@ examples using the ORY Hydra SDK in different languages.
</TabItem>
<TabItem value="json">


```json
{
"challenge": "f633e49d56bc40e0a876ac8242eb9891",
Expand Down Expand Up @@ -216,7 +213,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
8 changes: 0 additions & 8 deletions docs/docs/concepts/login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,11 @@ correct endpoint for your interactions.
]}>
<TabItem value="ui">


![OAuth 2.0 Client](../images/oauth2-consumer.png)

</TabItem>
<TabItem value="html">


```html
<a
href="https://<hydra-public>/oauth2/auth?client_id=...&response_type=...&scope=..."
Expand All @@ -96,7 +94,6 @@ correct endpoint for your interactions.
</TabItem>
<TabItem value="js">


```js
// ...
window.location.href =
Expand All @@ -106,7 +103,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 @@ -206,13 +202,11 @@ more details about the implementation check the
]}>
<TabItem value="ui">
![OAuth 2.0 Login UI Screen](../images/login-endpoint.png)
</TabItem>
<TabItem value="curl">
```
curl "http://127.0.0.1:4445/oauth2/auth/requests/login?login_challenge=7bb518c4eec2454dbb289f5fdb4c0ee2"
```
Expand All @@ -223,7 +217,6 @@ examples using the ORY Hydra SDK in different languages.
</TabItem>
<TabItem value="json">
```json
{
"challenge": "7bb518c4eec2454dbb289f5fdb4c0ee2",
Expand Down Expand Up @@ -262,7 +255,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
2 changes: 0 additions & 2 deletions docs/docs/guides/consent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ to ORY Hydra's Admin Endpoint!
]}>
<TabItem value="ui">


![OAuth2 Consent UI Screen](../images/consent-endpoint.png)

</TabItem>
Expand All @@ -59,7 +58,6 @@ to ORY Hydra's Admin Endpoint!
</TabItem>
</Tabs>


## Accepting the Consent Request

<Tabs defaultValue="node" values={[{ label: 'NodeJS', value: 'node' }]}>
Expand Down
8 changes: 0 additions & 8 deletions docs/docs/guides/login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ to ORY Hydra's Admin Endpoint!
]}>
<TabItem value="ui">


![OAuth2 Login UI Screen](../images/login-endpoint.png)

</TabItem>
<TabItem value="node">


:::note

Check out our
Expand Down Expand Up @@ -104,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 @@ -122,7 +119,6 @@ router.get('/login', csrfProtection, (req, res, next) => {
</TabItem>
</Tabs>


## Accepting the Login Request

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


:::note

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


## Rejecting the Login Request

<Tabs
Expand All @@ -201,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 @@ -218,4 +211,3 @@ hydraAdmin

</TabItem>
</Tabs>

8 changes: 0 additions & 8 deletions docs/docs/guides/logout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ to ORY Hydra's Admin Endpoint!
]}>
<TabItem value="ui">


![OAuth2 Logout UI Screen](../images/logout-endpoint.png)

</TabItem>
<TabItem value="node">


:::note

Check out our
Expand Down Expand Up @@ -96,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 @@ -109,7 +106,6 @@ router.get('/', csrfProtection, (req, res, next) => {
</TabItem>
</Tabs>


## Accepting Logout

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


:::note

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


## Rejecting Logout

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


:::note

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

</TabItem>
</Tabs>

Loading

0 comments on commit 380fc94

Please sign in to comment.