Public/Authorization/Get-AspireAPIConnection.ps1

<#
.SYNOPSIS
    Retrieves the current access and refresh tokens for the Aspire API.
.DESCRIPTION
    Returns a hashtable containing the access token and refresh token stored in the script scope.
    If either token is not available, returns $null for that token.
.OUTPUTS
    Hashtable with keys 'AccessToken' and 'RefreshToken', each containing the respective token or $null.
.EXAMPLE
    $tokens = Get-AspireAPIConnection
    Write-Output "Access Token: $($tokens.AccessToken)"
    Write-Output "Refresh Token: $($tokens.RefreshToken)"
#>

function Get-AspireAPIConnection {
    [CmdletBinding()]
    param()

    return @{
        AccessToken = $script:AspireToken
        RefreshToken = $script:AspireRefreshToken
    }
}