diff --git a/docs/collections/_abouttopics/about_tsssession.md b/docs/collections/_abouttopics/about_tsssession.md index f00e6b35..64f28e60 100644 --- a/docs/collections/_abouttopics/about_tsssession.md +++ b/docs/collections/_abouttopics/about_tsssession.md @@ -39,17 +39,18 @@ last_modified_at: 2021-02-15T00:00:00-00:00 TokenType: Based on the authentication method (possible values: bearer, ExternalToken, or WindowsAuth) - StartTime: - Current date and time when session was created - Hidden property - ExpiresIn: Authentication token expiration time, in seconds + StartTime: + Current date and time when session was created + TimeOfDeath: Expiration date and time based on ExpiresIn value. Provides the time when the authentication token will no longer be valid. - Hidden property + + Take: + Endpoints that allow paging, defaults to max value allowed # METHODS diff --git a/docs/collections/_docs/01-authentication.md b/docs/collections/_docs/01-authentication.md index 478f9cdd..1436cbbd 100644 --- a/docs/collections/_docs/01-authentication.md +++ b/docs/collections/_docs/01-authentication.md @@ -71,7 +71,7 @@ More: [How to Secure Your Passwords with PowerShell](https://www.sqlshack.com/ho ### SecretManagement Module -Microsoft's PowerShell Team has released a module that offers an efficient, secure, and easily managed option to the other methods commonly used for securely storing your OAuth2 username and password in PowerShell. +Microsoft's PowerShell Team's [SecretManagement](https://devblogs.microsoft.com/powershell/secretmanagement-and-secretstore-are-generally-available/) modules give you a universal abstraction layer for management of credentials that you need to use in your scripts on a given machine. These modules are cross-platform and can be used on **any** operating system that Windows PowerShell or Powershell 7+ are supported. Your admins can leverage these two modules to more secure store the OAuth2 credential needed for authenticating with Secret Server's. More: diff --git a/src/classes/auth/TssSession.class.ps1 b/src/classes/auth/TssSession.class.ps1 index 25d7d875..8a824a59 100644 --- a/src/classes/auth/TssSession.class.ps1 +++ b/src/classes/auth/TssSession.class.ps1 @@ -21,14 +21,12 @@ class TssSession { [string] $TokenType - hidden - [datetime] - $StartTime - [int] $ExpiresIn - hidden + [datetime] + $StartTime + [datetime] $TimeOfDeath @@ -94,7 +92,7 @@ class TssSession { return $false } try { - $url = $this.SecretServer + 'oauth2/token' -join '/' + $url = $this.SecretServer, 'oauth2', 'token' -join '/' $body = @{ refresh_token = $this.RefreshToken grant_type = 'refresh_token' diff --git a/src/en-us/about_tsssession.help.txt b/src/en-us/about_tsssession.help.txt index 3c366ff9..b55d4fe6 100644 --- a/src/en-us/about_tsssession.help.txt +++ b/src/en-us/about_tsssession.help.txt @@ -33,17 +33,18 @@ PROPERTIES TokenType: Based on the authentication method (possible values: bearer, ExternalToken, or WindowsAuth) - StartTime: - Current date and time when session was created - Hidden property - ExpiresIn: Authentication token expiration time, in seconds + StartTime: + Current date and time when session was created + TimeOfDeath: Expiration date and time based on ExpiresIn value. Provides the time when the authentication token will no longer be valid. - Hidden property + + Take: + Endpoints that allow paging, defaults to max value allowed METHODS