tokenadministration

package
v1.0.0-b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResourceAreaId, _ = uuid.Parse("95935461-9e54-44bd-b9fb-04f4dd05d640")

Functions

This section is empty.

Types

type Client

type Client interface {
	// [Preview API] Revokes the listed OAuth authorizations.
	ListIdentitiesWithGlobalAccessTokens(context.Context, ListIdentitiesWithGlobalAccessTokensArgs) (*[]uuid.UUID, error)
	// [Preview API] Lists of all the session token details of the personal access tokens (PATs) for a particular user.
	ListPersonalAccessTokens(context.Context, ListPersonalAccessTokensArgs) (*tokenadmin.TokenAdminPagedSessionTokens, error)
	// [Preview API] Revokes the listed OAuth authorizations.
	RevokeAuthorizations(context.Context, RevokeAuthorizationsArgs) (*[]delegatedauthorization.SessionToken, error)
}

func NewClient

func NewClient(ctx context.Context, connection *azuredevops.Connection) (Client, error)

type ClientImpl

type ClientImpl struct {
	Client azuredevops.Client
}

func (*ClientImpl) ListIdentitiesWithGlobalAccessTokens

func (client *ClientImpl) ListIdentitiesWithGlobalAccessTokens(ctx context.Context, args ListIdentitiesWithGlobalAccessTokensArgs) (*[]uuid.UUID, error)

[Preview API] Revokes the listed OAuth authorizations.

func (*ClientImpl) ListPersonalAccessTokens

[Preview API] Lists of all the session token details of the personal access tokens (PATs) for a particular user.

func (*ClientImpl) RevokeAuthorizations

func (client *ClientImpl) RevokeAuthorizations(ctx context.Context, args RevokeAuthorizationsArgs) (*[]delegatedauthorization.SessionToken, error)

[Preview API] Revokes the listed OAuth authorizations.

type ListIdentitiesWithGlobalAccessTokensArgs

type ListIdentitiesWithGlobalAccessTokensArgs struct {
	// (required) The list of identities containing the authorization IDs of the OAuth authorizations, such as session tokens retrieved by listed a users PATs, that should be checked for global access tokens.
	Revocations *[]tokenadmin.TokenAdminRevocation
	// (optional) Set to false for PAT tokens and true for SSH tokens.
	IsPublic *bool
}

Arguments for the ListIdentitiesWithGlobalAccessTokens function

type ListPersonalAccessTokensArgs

type ListPersonalAccessTokensArgs struct {
	// (required)
	Audience *[]string
	// (required) The descriptor of the target user.
	SubjectDescriptor *string
	// (optional) The maximum number of results to return on each page.
	PageSize *int
	// (optional) An opaque data blob that allows the next page of data to resume immediately after where the previous page ended. The only reliable way to know if there is more data left is the presence of a continuation token.
	ContinuationToken *string
	// (optional) Set to false for PAT tokens and true for SSH tokens.
	IsPublic *bool
}

Arguments for the ListPersonalAccessTokens function

type RevokeAuthorizationsArgs

type RevokeAuthorizationsArgs struct {
	// (required) The list of objects containing the authorization IDs of the OAuth authorizations, such as session tokens retrieved by listed a users PATs, that should be revoked.
	Revocations *TokenAdministrationRevocation
	// (required) Host Id to display on the notification page to manage tokens.
	HostId *uuid.UUID
	// (optional) Set to false for PAT tokens and true for SSH tokens.
	IsPublic *bool
}

Arguments for the RevokeAuthorizations function

type TokenAdministrationRevocation

type TokenAdministrationRevocation struct {
	// A list of audience (target accounts) to limit the revocations to
	Audience *[]string `json:"audience,omitempty"`
	// A list of authorization ID of the OAuth authorization to revoke.
	AuthorizationIds *[]uuid.UUID `json:"authorizationIds,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL