Skip to content

Commit

Permalink
Adding SSO InitURL to Update-AWSSAMLLogin (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-holmes1111 authored May 16, 2020
1 parent 33922b7 commit 9e62b8b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AWS.SAML.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AWS.SAML.psm1'

# Version number of this module.
ModuleVersion = '1.5.0'
ModuleVersion = '1.6.0'

# Supported PSEditions
# CompatiblePSEditions = @('Desktop', 'Core')
Expand Down
8 changes: 7 additions & 1 deletion AWS.SAML.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ function New-AWSSAMLLogin {
.EXAMPLE
C:\PS> Update-AWSSAMLLogin
.PARAMETER InitURL
The SAML Login Initiation URL. If not passed you will be prompted if an existing Initiation URL is not found.
.PARAMETER Browser
Choose the browser to handle the login process. Options: Chrome, Firefox, Edge, IE Default: Chrome
Expand All @@ -107,6 +110,7 @@ function Update-AWSSAMLLogin {
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Low')]
[Alias('Update-AWSSAML','uas')]
param(
[String]$InitURL,
[ValidateSet('Chrome', 'Firefox', 'Edge', 'IE')]
[String]$Browser = 'Chrome',
[Alias('Profile')]
Expand All @@ -115,7 +119,9 @@ function Update-AWSSAMLLogin {
)
if ($pscmdlet.ShouldProcess('AWS SAML', 'update'))
{
$InitURL = Get-AWSSAMLURL
if([String]::IsNullOrWhiteSpace($InitURL)){
$InitURL = Get-AWSSAMLURL
}

# Start Browser for Login
$driver = Start-Browser -InitURL $InitURL -Browser $Browser -Headless
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
*These will be removed in the next major release*
- N/A

1.6.0
-----
- Allowing SAML Login Initiation URL to be passed to Update-AWSSAMLLogin cmdlet

1.5.0
-----
- Handle updating profiles that the user no longer has access to
Expand Down

0 comments on commit 9e62b8b

Please sign in to comment.