Skip to content

AccessToken for Register-PSResourceRepository and Set-PSResourceRepository #2010

Description

@SQLCanuck

Summary of the new feature / enhancement

Please, add an AccessToken parameter to Register-PSResourceRepository. It would allow for Access Token authentication to repositories that have two factor authentication requirements. Set-PSResourceRepository should also have the parameter to allow for easy updates/rotation of the Access Token.

Proposed technical implementation details (optional)

Add a new parameter to Register-PSResourceRepository and Set-PSResourceRepository named AccessToken.

Example Create New Repository:

$parameters = @{
  Name = 'MyRepository'
  Uri = 'https://artifacts.example.com/api/v3'
  Trusted = $true
  Priority = 30
  AccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'
}
Register-PSResourceRepository @parameters

Example Update Access Token for Repository:

Set-PSResourceRepository -Name 'MyRepository' -AccessToken 'xzAmbQciOYiJIUzI1CiIsInA5cCI6ItpTWRL7'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions