Skip to content

PowerShell bindings for System.Net.HttpListener

License

Notifications You must be signed in to change notification settings

psteniusubi/Ubisecure.HttpListener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerShell Http Listener

PowerShell bindings for System.Net.HttpListener

Used by Ubisecure.OAuth2

These commands are intendend to support Loopback Interface Redirection as defined in OAuth 2.0 for Native Apps

https://tools.ietf.org/html/draft-ietf-oauth-native-apps-12#section-7.3

Install from github.com

Windows

cd /d %USERPROFILE%\Documents\WindowsPowerShell\Modules
git clone https://github.com/psteniusubi/Ubisecure.HttpListener.git

Linux

cd ~/.local/share/powershell/Modules
git clone https://github.com/psteniusubi/Ubisecure.HttpListener.git

Example use

$listener = Start-HttpListener -Prefix "http://localhost/application/redirect/" -RandomPort

Start-Process $listener.Prefix | Out-Null

$request = $listener | Read-HttpRequest | Write-HttpResponse -Body "<p>Hello World</p>" -Stop -PassThru

Write-Host "$($request.HttpMethod) $($request.Url)"

About

PowerShell bindings for System.Net.HttpListener

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published