Private/Session/_Classes.ps1
class Session { [string] $Uri [string] $Token [bool]$isValid [string]$InvalidReason [pscredential] $Credential [datetime] $Expires [System.Net.CookieContainer] $Cookies Session() { $this.isValid = $false $this.Uri = "" $this.Cookies = [System.Net.CookieContainer]::new() } Session( [string] $Uri) { $this.isValid = $true $this.Uri = $Uri $this.Cookies = [System.Net.CookieContainer]::new() } } |