Skip to content

Commit

Permalink
#321: Fix too many ..'s in links
Browse files Browse the repository at this point in the history
  • Loading branch information
Badgerati committed Aug 8, 2019
1 parent 35ed69e commit 3716e91
Show file tree
Hide file tree
Showing 34 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion docs/Getting-Started/LocalModules.md
Expand Up @@ -40,4 +40,4 @@ package.json

## Importing

When the modules have been downloaded, you can utilise them using the [`Import-PodeModule`](../../../Functions/Utilities/Import-PodeModule) function.
When the modules have been downloaded, you can utilise them using the [`Import-PodeModule`](../../Functions/Utilities/Import-PodeModule) function.
2 changes: 1 addition & 1 deletion docs/Tutorials/Authentication/Inbuilt/WindowsAD.md
Expand Up @@ -5,7 +5,7 @@

## Usage

To use Windows AD authentication you use the [`Add-PodeAuthWindowsAd`](../../../../../Functions/Authentication/Add-PodeAuthWindowsAd) function. The following example will validate a user's credentials, supplied via a web-form against the default DNS domain defined in `$env:USERDNSDOMAIN`:
To use Windows AD authentication you use the [`Add-PodeAuthWindowsAd`](../../../../Functions/Authentication/Add-PodeAuthWindowsAd) function. The following example will validate a user's credentials, supplied via a web-form against the default DNS domain defined in `$env:USERDNSDOMAIN`:

```powershell
Start-PodeServer {
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Authentication/Methods/Basic.md
Expand Up @@ -4,7 +4,7 @@ Basic Authentication is when you pass an encoded `username:password` value on th

## Setup

To setup and start using Form Authentication in Pode you use the `New-PodeAuthType -Basic` function, and then pipe this into the [`Add-PodeAuth`](../../../../../Functions/Authentication/Add-PodeAuth) function:
To setup and start using Form Authentication in Pode you use the `New-PodeAuthType -Basic` function, and then pipe this into the [`Add-PodeAuth`](../../../../Functions/Authentication/Add-PodeAuth) function:

```powershell
Start-PodeServer {
Expand Down
4 changes: 2 additions & 2 deletions docs/Tutorials/Authentication/Methods/Custom.md
Expand Up @@ -4,11 +4,11 @@ Custom authentication works much like the inbuilt types (Basic and Form), but al

## Setup and Parsing

To setup and start using Custom authentication in Pode you use the `New-PodeAuthType -Custom` function, and then pipe this into the [`Add-PodeAuth`](../../../../../Functions/Authentication/Add-PodeAuth) function.
To setup and start using Custom authentication in Pode you use the `New-PodeAuthType -Custom` function, and then pipe this into the [`Add-PodeAuth`](../../../../Functions/Authentication/Add-PodeAuth) function.

Let's say we wanted something similar to [`Form`](../Form) Authentication, but it requires a third piece of information: `ClientName`. To setup Custom Authentication for this method, you'll need to specify the parsing logic within the `-ScriptBlock`.

The `-ScriptBlock` on [`New-PodeAuthType`](../../../../../Functions/Authentication/New-PodeAuthType) will be passed the current web event (containing the `Request`/`Response` objects, much like a Route). In this script you can parse the Request payload/headers for any credential information that needs validating. Once sourced, the data returned from the script should be either an `array`, which will then splatted onto the `-ScriptBlock` from your [`New-PodeAuthType`](../../../../../Functions/Authentication/New-PodeAuthType) function:
The `-ScriptBlock` on [`New-PodeAuthType`](../../../../Functions/Authentication/New-PodeAuthType) will be passed the current web event (containing the `Request`/`Response` objects, much like a Route). In this script you can parse the Request payload/headers for any credential information that needs validating. Once sourced, the data returned from the script should be either an `array`, which will then splatted onto the `-ScriptBlock` from your [`New-PodeAuthType`](../../../../Functions/Authentication/New-PodeAuthType) function:

```powershell
Start-PodeServer {
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Authentication/Methods/Form.md
Expand Up @@ -4,7 +4,7 @@ Form Authentication is for when you're using a `<form>` in HTML, and you submit

## Setup

To setup and start using Form Authentication in Pode you use the `New-PodeAuthType -Form` function, and then pipe this into the [`Add-PodeAuth`](../../../../../Functions/Authentication/Add-PodeAuth) function:
To setup and start using Form Authentication in Pode you use the `New-PodeAuthType -Form` function, and then pipe this into the [`Add-PodeAuth`](../../../../Functions/Authentication/Add-PodeAuth) function:

```powershell
Start-PodeServer {
Expand Down
18 changes: 9 additions & 9 deletions docs/Tutorials/Authentication/Overview.md
Expand Up @@ -5,13 +5,13 @@ Authentication can either be sessionless (requiring validation on every request)
!!! info
To use session-persistent authentication you will also need to use Session Middleware.

To setup and use authentication in Pode you need to use the [`New-PodeAuthType`](../../../../Functions/Authentication/New-PodeAuthType) and [`New-PodeAuthType`](../../../../Functions/Authentication/New-PodeAuthType) functions, as well as the [`New-PodeAuthType`](../../../../Functions/Authentication/New-PodeAuthType) function for defining authentication Middleware.
To setup and use authentication in Pode you need to use the [`New-PodeAuthType`](../../../Functions/Authentication/New-PodeAuthType) and [`New-PodeAuthType`](../../../Functions/Authentication/New-PodeAuthType) functions, as well as the [`New-PodeAuthType`](../../../Functions/Authentication/New-PodeAuthType) function for defining authentication Middleware.

## Functions

### New-PodeAuthType

The [`New-PodeAuthType`](../../../../Functions/Authentication/New-PodeAuthType) function allows you to create and configure Basic/Form authentication types, or you can create your own Custom authentication types. These types can then be used on the [`New-PodeAuthType`](../../../../Functions/Authentication/New-PodeAuthType) function.
The [`New-PodeAuthType`](../../../Functions/Authentication/New-PodeAuthType) function allows you to create and configure Basic/Form authentication types, or you can create your own Custom authentication types. These types can then be used on the [`New-PodeAuthType`](../../../Functions/Authentication/New-PodeAuthType) function.

An example of creating Basic/Form authentication is as follows:

Expand Down Expand Up @@ -47,9 +47,9 @@ Start-PodeServer {

### Add-PodeAuth

The [`Add-PodeAuth`](../../../../Functions/Authentication/Add-PodeAuth) function allows you to add authentication methods to your server. You can have many methods configured, defining which one to validate against using the [`Add-PodeAuth`](../../../../Functions/Authentication/Add-PodeAuth) function.
The [`Add-PodeAuth`](../../../Functions/Authentication/Add-PodeAuth) function allows you to add authentication methods to your server. You can have many methods configured, defining which one to validate against using the [`Add-PodeAuth`](../../../Functions/Authentication/Add-PodeAuth) function.

An example of using [`Add-PodeAuth`](../../../../Functions/Authentication/Add-PodeAuth) for Basic authentication is as follows:
An example of using [`Add-PodeAuth`](../../../Functions/Authentication/Add-PodeAuth) for Basic authentication is as follows:

```powershell
Start-PodeServer {
Expand All @@ -61,15 +61,15 @@ Start-PodeServer {
}
```

The `-Name` of the authentication method must be unique. The `-Type` comes from [`New-PodeAuthType`](../../../../Functions/Authentication/New-PodeAuthType), and can also be pied in.
The `-Name` of the authentication method must be unique. The `-Type` comes from [`New-PodeAuthType`](../../../Functions/Authentication/New-PodeAuthType), and can also be pied in.

The `-ScriptBlock` is used to validate a user, checking if they exist and the password is correct (or checking if they exist in some data store). If the ScriptBlock succeeds, then a `User` needs to be returned from the script as `@{ User = $user }`. If `$null`, or a null user is returned then the script is assumed to have failed - meaning the user will have failed authentication.

### Get-PodeAuthMiddleware

The [`Get-PodeAuthMiddleware`](../../../../Functions/Authentication/Get-PodeAuthMiddleware) function allows you to define which authentication method to validate a Request against. It returns valid Middleware, meaning you can either use it on specific Routes, or globally for all routes as Middleware. If this action fails, then a 401 response is returned.
The [`Get-PodeAuthMiddleware`](../../../Functions/Authentication/Get-PodeAuthMiddleware) function allows you to define which authentication method to validate a Request against. It returns valid Middleware, meaning you can either use it on specific Routes, or globally for all routes as Middleware. If this action fails, then a 401 response is returned.

An example of using [`Get-PodeAuthMiddleware`](../../../../Functions/Authentication/Get-PodeAuthMiddleware) against Basic authentication is as follows. The first example sets up global middleware, whereas the second example sets up custom Route Middleware:
An example of using [`Get-PodeAuthMiddleware`](../../../Functions/Authentication/Get-PodeAuthMiddleware) against Basic authentication is as follows. The first example sets up global middleware, whereas the second example sets up custom Route Middleware:

```powershell
Start-PodeServer {
Expand All @@ -85,11 +85,11 @@ Start-PodeServer {

On success, it will allow the Route logic to be invoked. If Session Middleware has been configured then an authenticated session is also created for future requests, using a signed session-cookie.

When the user makes another call using the same authenticated session and that cookie is present, then [`Get-PodeAuthMiddleware`](../../../../Functions/Authentication/Get-PodeAuthMiddleware) will detect the already authenticated session and skip validation. If you're using sessions and you don't want to check the session, or store the user against a session, then use the `-Sessionless` switch.
When the user makes another call using the same authenticated session and that cookie is present, then [`Get-PodeAuthMiddleware`](../../../Functions/Authentication/Get-PodeAuthMiddleware) will detect the already authenticated session and skip validation. If you're using sessions and you don't want to check the session, or store the user against a session, then use the `-Sessionless` switch.

## Users

After successful validation, an `Auth` object will be created for use against the current web event. This `Auth` object will be accessible via the argument supplied to Routes and Middleware (though it will only be available in Middleware created after the Middleware from [`Get-PodeAuthMiddleware`](../../../../Functions/Authentication/Get-PodeAuthMiddleware) is invoked).
After successful validation, an `Auth` object will be created for use against the current web event. This `Auth` object will be accessible via the argument supplied to Routes and Middleware (though it will only be available in Middleware created after the Middleware from [`Get-PodeAuthMiddleware`](../../../Functions/Authentication/Get-PodeAuthMiddleware) is invoked).

The `Auth` object will also contain:

Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Basics.md
@@ -1,6 +1,6 @@
# Basics

All of your main server logic must be set using the [`Start-PodeServer`](../../../Functions/Core/Start-PodeServer) block:
All of your main server logic must be set using the [`Start-PodeServer`](../../Functions/Core/Start-PodeServer) block:

```powershell
Start-PodeServer {
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Certificates.md
Expand Up @@ -7,7 +7,7 @@ Pode has the ability to generate and bind self-signed certificates (for dev/test

## Self-Signed

If you are developing/testing a site on HTTPS then Pode can generate and bind quick self-signed certificates. To do this you can pass the `-SelfSigned` swicth to the [`Add-PodeEndpoint`](../../../Functions/Core/Add-PodeEndpoint) functions:
If you are developing/testing a site on HTTPS then Pode can generate and bind quick self-signed certificates. To do this you can pass the `-SelfSigned` swicth to the [`Add-PodeEndpoint`](../../Functions/Core/Add-PodeEndpoint) functions:

```powershell
Start-PodeServer {
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Configuration.md
Expand Up @@ -27,7 +27,7 @@ After this, you can put whatever else you want into the configuration file.

The configuration file is automatically loaded when you start your server. Pode will look in the root directory of your server for a `server.psd1` file, and if found it will be loaded internally.

Within your scripts you can use the [`Get-PodeConfig`](../../../Functions/Utilities/Get-PodeConfig) function, which will return the values of the relevant configuration file.
Within your scripts you can use the [`Get-PodeConfig`](../../Functions/Utilities/Get-PodeConfig) function, which will return the values of the relevant configuration file.

For example, say you have the following `server.psd1`:

Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/ImportingModules.md
@@ -1,6 +1,6 @@
# Importing Modules/SnapIns

Because Pode runs most things in isolated runspaces, importing and using modules or snap-ins can be quite bothersome. To overcome this, you can use the [`Import-PodeModule`](../../../Functions/Utilities/Import-PodeModule) or [`Import-PodeModule`](../../../Functions/Utilities/Import-PodeModule) functions to declare paths/names of modules or snap-ins that need to be imported into all of the runspaces.
Because Pode runs most things in isolated runspaces, importing and using modules or snap-ins can be quite bothersome. To overcome this, you can use the [`Import-PodeModule`](../../Functions/Utilities/Import-PodeModule) or [`Import-PodeModule`](../../Functions/Utilities/Import-PodeModule) functions to declare paths/names of modules or snap-ins that need to be imported into all of the runspaces.

!!! important
Snap-ins are only supported in Windows PowerShell.
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Logging/Methods/Custom.md
Expand Up @@ -7,7 +7,7 @@ These custom method can be used for any log type - Requests, Error, or Custom.
The ScriptBlock you create will be supplied two arguments:

1. The item to be logged. This could be a string (from Requests/Errors), or any custom type.
2. The options you supplied on [`New-PodeLoggingMethod`](../../../../../Functions/Logging/New-PodeLoggingMethod).
2. The options you supplied on [`New-PodeLoggingMethod`](../../../../Functions/Logging/New-PodeLoggingMethod).

## Examples

Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Logging/Overview.md
Expand Up @@ -5,7 +5,7 @@ There are two aspects to logging in Pode: Methods and Types.
* Methods define how log items should be recorded, such as to a file or terminal.
* Types define how items to log are transformed, and what should be supplied to the Method.

For example when you supply an Exception to [`Write-PodeErrorLog`](../../../../Functions/Logging/Write-PodeErrorLog), this Exception is first supplied to Pode's inbuilt Error type. This type transforms any Exception (or Error Record) into a string which can then be supplied to the File logging method.
For example when you supply an Exception to [`Write-PodeErrorLog`](../../../Functions/Logging/Write-PodeErrorLog), this Exception is first supplied to Pode's inbuilt Error type. This type transforms any Exception (or Error Record) into a string which can then be supplied to the File logging method.

In Pode you can use File, Terminal or a Custom method. As well as Request, Error, or a Custom type.

Expand Down
8 changes: 4 additions & 4 deletions docs/Tutorials/Logging/Types/Custom.md
@@ -1,13 +1,13 @@
# Custom

You can define Custom logging types in Pode by using the [`Add-PodeLogger`](../../../../../Functions/Logging/Add-PodeLogger) function. Much like Requests and Errors, this function too accepts any logging method from [`New-PodeLoggingMethod`](../../../../../Functions/Logging/New-PodeLoggingMethod).
You can define Custom logging types in Pode by using the [`Add-PodeLogger`](../../../../Functions/Logging/Add-PodeLogger) function. Much like Requests and Errors, this function too accepts any logging method from [`New-PodeLoggingMethod`](../../../../Functions/Logging/New-PodeLoggingMethod).

When adding a Custom logger, you supply a `-ScriptBlock` plus a hashtable for any optional `-Options`. The function also requires a unique `-Name`, so that it can be referenced from the [`Write-PodeLog`](../../../../../Functions/Logging/Write-PodeLog) function.
When adding a Custom logger, you supply a `-ScriptBlock` plus a hashtable for any optional `-Options`. The function also requires a unique `-Name`, so that it can be referenced from the [`Write-PodeLog`](../../../../Functions/Logging/Write-PodeLog) function.

The scriptblock will be supplied two arguments:

1. The item to log that was supplied via [`Write-PodeLog`](../../../../../Functions/Logging/Write-PodeLog).
2. The options that were supplied from [`Add-PodeLogger`](../../../../../Functions/Logging/Add-PodeLogger)'s `-Options` parameter.
1. The item to log that was supplied via [`Write-PodeLog`](../../../../Functions/Logging/Write-PodeLog).
2. The options that were supplied from [`Add-PodeLogger`](../../../../Functions/Logging/Add-PodeLogger)'s `-Options` parameter.

## Examples

Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/Logging/Types/Errors.md
Expand Up @@ -6,7 +6,7 @@ It also has support for error levels (such as Error, Warning, Verbose), with sup

## Enabling

To enable and use the Error logging you use the [`Enable-PodeErrorLogging`](../../../../../Functions/Logging/Enable-PodeErrorLogging) function, supplying a logging method from [`New-PodeLoggingMethod`](../../../../../Functions/Logging/New-PodeLoggingMethod). You can supply your own errors to be logged by using [`New-PodeLoggingMethod`](../../../../../Functions/Logging/New-PodeLoggingMethod).
To enable and use the Error logging you use the [`Enable-PodeErrorLogging`](../../../../Functions/Logging/Enable-PodeErrorLogging) function, supplying a logging method from [`New-PodeLoggingMethod`](../../../../Functions/Logging/New-PodeLoggingMethod). You can supply your own errors to be logged by using [`New-PodeLoggingMethod`](../../../../Functions/Logging/New-PodeLoggingMethod).

When Pode logs an error, the information being logged is as follows:

Expand Down
4 changes: 2 additions & 2 deletions docs/Tutorials/Logging/Types/Requests.md
Expand Up @@ -4,9 +4,9 @@ Pode has inbuilt Request logging logic, that will parse and return a valid log i

## Enabling

To enable and use the Request logging you use the [`Enable-PodeRequestLogging`](../../../../../Functions/Logging/Enable-PodeRequestLogging) function, supplying a logging method from [`New-PodeLoggingMethod`](../../../../../Functions/Logging/New-PodeLoggingMethod).
To enable and use the Request logging you use the [`Enable-PodeRequestLogging`](../../../../Functions/Logging/Enable-PodeRequestLogging) function, supplying a logging method from [`New-PodeLoggingMethod`](../../../../Functions/Logging/New-PodeLoggingMethod).

The Request type logic will format a string using [Combined Log Format](https://httpd.apache.org/docs/1.3/logs.html#combined). This string is then supplied to the logging method's scriptblock. If you're using a Custom logging method and want the raw hashtable instead, you can supply `-Raw` to [`Enable-PodeRequestLogging`](../../../../../Functions/Logging/Enable-PodeRequestLogging).
The Request type logic will format a string using [Combined Log Format](https://httpd.apache.org/docs/1.3/logs.html#combined). This string is then supplied to the logging method's scriptblock. If you're using a Custom logging method and want the raw hashtable instead, you can supply `-Raw` to [`Enable-PodeRequestLogging`](../../../../Functions/Logging/Enable-PodeRequestLogging).

## Examples

Expand Down

0 comments on commit 3716e91

Please sign in to comment.