Skip to content

Commit

Permalink
modifies the type
Browse files Browse the repository at this point in the history
  • Loading branch information
afzal442 committed Nov 20, 2023
1 parent 065f140 commit ba8dbf0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion docs/pages/auth-concept/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ components:

```

**The Client asyncapi.yaml file does not need to implement all the security requirements in the server, it only needs to implement the ones that it uses like `userPassword` here.**
**The Client asyncapi.yaml file does not need to implement all the security requirements in the server, it only needs to implement the ones that it uses like *userPassword* here.**


Glee can act as both a server and a client. Hence the need for `serverAuth` and `clientAuth`. Glee acts as a client when the server name is included in the `x-remoteServers` property in the `asyncapi.yaml` file.
Expand Down Expand Up @@ -116,6 +116,11 @@ export async function serverAuth({ authProps, done }) {
}
}
```
**Parameters for done():**

- Authentication Result (Boolean): true for success, false for failure.
- HTTP Status Code (Integer): Code for authentication failure (e.g., 401 for Unauthorized).
- Status Message (String): Description of the authentication result (e.g., "Unauthorized").

When `true` is passed to the done parameter, the server/broker knows to go ahead and allow the client to connect, which means authentication has succeeded. However if the `done` parameter is called with `false` then the server knows to throw an error message and reject the client, which means authenticatio has failed.

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/auth-concept/bearerToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ components:

```

**The Client asyncapi.yaml file does't need to implement all the security requirements in the server, it only needs to implement the ones that it uses like `http (bearer token)` here.**
**The Client asyncapi.yaml file does't need to implement all the security requirements in the server, it only needs to implement the ones that it uses like &*http (bearer token)* here.**

### Client Side

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/auth-concept/httpApiKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ components:

The `httpApiKey` could be in either the header or query parameter.

**The Client asyncapi.yaml file does not need to implement all the security requirements in the server, it only needs to implement the ones that it uses like `httpApiKey` here.**
**The Client asyncapi.yaml file does not need to implement all the security requirements in the server, it only needs to implement the ones that it uses like *httpApiKey* here.**

### Client Side

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/auth-concept/userPassword.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ components:

```

**The Client asyncapi.yaml file does not need to implement all the security requirements in the server, it only needs to implement the ones that it uses like `userPassword` here.**
**The Client asyncapi.yaml file does not need to implement all the security requirements in the server, it only needs to implement the ones that it uses like &*userPassword* here.**

### Client Side

Expand Down

0 comments on commit ba8dbf0

Please sign in to comment.