Skip to content

Commit

Permalink
Merge pull request #1076 from Badgerati/develop
Browse files Browse the repository at this point in the history
v2.8.0
  • Loading branch information
Badgerati authored Feb 2, 2023
2 parents 8aa7c2b + 32eec88 commit b6a97d2
Show file tree
Hide file tree
Showing 113 changed files with 8,453 additions and 1,603 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1.9.0
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Install Invoke-Build
shell: pwsh
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/label-issue-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add labeled issues to project

on:
issues:
types:
- labeled

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.3.0
with:
project-url: https://github.com/users/Badgerati/projects/2
github-token: ${{ secrets.PROJECT_TOKEN }}
labeled: 'planned :calendar:, roadmap :rocket:, backlog :scroll:, draft :pencil2:, idea :bulb:'
label-operator: OR
18 changes: 18 additions & 0 deletions .github/workflows/open-issue-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Add opened issues to project

on:
issues:
types:
- opened

jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.3.0
with:
project-url: https://github.com/users/Badgerati/projects/2
github-token: ${{ secrets.PROJECT_TOKEN }}
labeled: 'bug :bug:, documentation :book:, packaging :package:, enhancement :arrow_up:, feature :sunny:'
label-operator: OR
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/powershell:7.2-ubuntu-20.04
FROM mcr.microsoft.com/powershell:7.3-ubuntu-22.04
LABEL maintainer="Matthew Kelly (Badgerati)"
RUN mkdir -p /usr/local/share/powershell/Modules/Pode
COPY ./pkg/ /usr/local/share/powershell/Modules/Pode
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) [2017-2022] [Matthew Kelly (Badgerati)]
Copyright (c) [2017-2023] [Matthew Kelly (Badgerati)]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Then navigate to `http://127.0.0.1:8000` in your browser.
* Authentication on requests, such as Basic, Windows and Azure AD
* Support for dynamically building Routes from Functions and Modules
* Generate/bind self-signed certificates
* Secret management support to load secrets from vaults
* Support for File Watchers
* (Windows) Open the hosted server as a desktop application

## 📦 Install
Expand Down Expand Up @@ -110,4 +112,4 @@ To work on issues you can fork Pode, and then open a Pull Request for approval.

You can find a list of the features, enhancements and ideas that will hopefully one day make it into Pode [here in the documentation](https://badgerati.github.io/Pode/roadmap/).

There is also a [Project](https://github.com/users/Badgerati/projects/2) in the beginnings of being setup for Pode, with milestone progression and current roadmap issues. Plus, there is a [Draft Board](https://github.com/users/Badgerati/projects/2/views/3) which contains a range of ideas for Pode features/enhancements which are either brilliant, ludicrous, or down right insane! Draft Issues are purely ideas, and any in the design stage might one day make it in! If you see a Draft Issue you which to discuss, or have an idea for one, please dicuss it over on [Discord](https://discord.gg/fRqeGcbF6h) in the `#ideas` or `#pode` channel.
There is also a [Project Board](https://github.com/users/Badgerati/projects/2) in the beginnings of being setup for Pode, with milestone progression and current roadmap issues and ideas. If you see any draft issues you wish to discuss, or have an idea for one, please discuss it over on [Discord](https://discord.gg/fRqeGcbF6h) in the `#ideas` or `#pode` channel.
2 changes: 1 addition & 1 deletion alpine.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/powershell:7.2-alpine-3.14
FROM mcr.microsoft.com/powershell:7.3-alpine-3.15
LABEL maintainer="Matthew Kelly (Badgerati)"
RUN mkdir -p /usr/local/share/powershell/Modules/Pode
COPY ./pkg/ /usr/local/share/powershell/Modules/Pode
2 changes: 1 addition & 1 deletion arm32.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/powershell:7.2-arm32v7-ubuntu-18.04
FROM mcr.microsoft.com/powershell:preview-7.3-arm32v7-ubuntu-18.04
LABEL maintainer="Matthew Kelly (Badgerati)"
RUN mkdir -p /usr/local/share/powershell/Modules/Pode
COPY ./pkg/ /usr/local/share/powershell/Modules/Pode
2 changes: 1 addition & 1 deletion docs/Getting-Started/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Install-Module -Name Pode
[![Docker](https://img.shields.io/docker/stars/badgerati/pode.svg?label=Stars)](https://hub.docker.com/r/badgerati/pode/)
[![Docker](https://img.shields.io/docker/pulls/badgerati/pode.svg?label=Pulls)](https://hub.docker.com/r/badgerati/pode/)

Pode can run on *nix environments, therefore it only makes sense for there to be Docker images for you to use! The images use PowerShell v7.2 on either an Ubuntu Focal image (default), an Alpine image, or an ARM32 image (for Raspberry Pis).
Pode can run on *nix environments, therefore it only makes sense for there to be Docker images for you to use! The images use PowerShell v7.3 on either an Ubuntu Jammy image (default), an Alpine image, or an ARM32 image (for Raspberry Pis).

* To pull down the latest Pode image you can do:

Expand Down
4 changes: 2 additions & 2 deletions docs/Hosting/Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pode has a Docker image that you can use to host your server, for instructions on pulling these images you can [look here](../../Installation).

The images use PowerShell v7.2 on either an Ubuntu Focal (default), Alpine, or ARM32 image.
The images use PowerShell v7.3 on either an Ubuntu Jammy (default), Alpine, or ARM32 image.

## Images

Expand All @@ -11,7 +11,7 @@ The images use PowerShell v7.2 on either an Ubuntu Focal (default), Alpine, or A

### Default

The default Pode image is an Ubuntu Focal image with PowerShell v7.2 and Pode installed. An example of using this image in your Dockerfile could be as follows:
The default Pode image is an Ubuntu Jammy image with PowerShell v7.3 and Pode installed. An example of using this image in your Dockerfile could be as follows:

```dockerfile
# pull down the pode image
Expand Down
24 changes: 24 additions & 0 deletions docs/Tutorials/Authentication/Inbuilt/UserFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,30 @@ Start-PodeServer {
}
```

Regardless of whether the password is a standard SHA256 hash or HMAC hash, the hashed output should be a base64 string. The following functions will return the hashed value in the expected format:

**SHA256 HASH**:
```powershell
function ConvertTo-SHA256([string]$String)
{
$SHA256 = New-Object System.Security.Cryptography.SHA256Managed
$SHA256Hash = $SHA256.ComputeHash([Text.Encoding]::ASCII.GetBytes($String))
$SHA256HashString = [Convert]::ToBase64String($SHA256Hash)
return $SHA256HashString
}
```

**HMAC HASH:**
```powershell
function ConvertTo-HMACSHA256([string]$String, [string]$Secret) {
$HMACSHA256 = New-Object System.Security.Cryptography.HMACSHA256
$HMACSHA256.Secret = [Text.Encoding]::ASCII.GetBytes($Secret)
$HMACSHA256Hash = $HMACSHA256.ComputeHash([Text.Encoding]::ASCII.GetBytes($String))
$HMACSHA256HashString = [Convert]::ToBase64String($HMACSHA256Hash)
return $HMACSHA256HashString
}
```

### User Object

The User object returned, and accessible on Routes, and other functions via the [web event](../../../WebEvent)'s `$WebEvent.Auth.User` property, will contain the following information:
Expand Down
4 changes: 2 additions & 2 deletions docs/Tutorials/Cookies.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Cookies

In Pode you can add/retrieve cookies for the Request/Response of the current web event. Using the cookie functions has to be done within the context of a web event, such as in Routes/Middleware/Authentication/Logging/Endware.
In Pode you can add/retrieve cookies for the Request/Response of the current web request. Using the cookie functions has to be done within the context of a web event, such as within Routes; Middleware; Authentication; Logging; and Endware.

## Adding Cookies

You can add a cookie to the response by using [`Set-PodeCookie`](../../Functions/Cookies/Set-PodeCookie), passing the Name and Value of cookie:
You can add a cookie to the response by using [`Set-PodeCookie`](../../Functions/Cookies/Set-PodeCookie), and passing the Name and Value of cookie:

```powershell
Add-PodeRoute -Method Get -Path '/' -ScriptBlock {
Expand Down
Loading

0 comments on commit b6a97d2

Please sign in to comment.