Documentation ¶
Index ¶
- Variables
- type Client
- type ClientImpl
- func (client *ClientImpl) CreateRevocationRule(ctx context.Context, args CreateRevocationRuleArgs) error
- func (client *ClientImpl) ListPersonalAccessTokens(ctx context.Context, args ListPersonalAccessTokensArgs) (*TokenAdminPagedSessionTokens, error)
- func (client *ClientImpl) RevokeAuthorizations(ctx context.Context, args RevokeAuthorizationsArgs) error
- type CreateRevocationRuleArgs
- type ListPersonalAccessTokensArgs
- type RevokeAuthorizationsArgs
- type TokenAdminPagedSessionTokens
- type TokenAdminRevocation
- type TokenAdminRevocationRule
Constants ¶
This section is empty.
Variables ¶
var ResourceAreaId, _ = uuid.Parse("af68438b-ed04-4407-9eb6-f1dbae3f922e")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // [Preview API] Creates a revocation rule to prevent the further usage of any OAuth authorizations that were created before the current point in time and which match the conditions in the rule. CreateRevocationRule(context.Context, CreateRevocationRuleArgs) error // [Preview API] Lists of all the session token details of the personal access tokens (PATs) for a particular user. ListPersonalAccessTokens(context.Context, ListPersonalAccessTokensArgs) (*TokenAdminPagedSessionTokens, error) // [Preview API] Revokes the listed OAuth authorizations. RevokeAuthorizations(context.Context, RevokeAuthorizationsArgs) error }
type ClientImpl ¶
type ClientImpl struct {
Client azuredevops.Client
}
func (*ClientImpl) CreateRevocationRule ¶
func (client *ClientImpl) CreateRevocationRule(ctx context.Context, args CreateRevocationRuleArgs) error
[Preview API] Creates a revocation rule to prevent the further usage of any OAuth authorizations that were created before the current point in time and which match the conditions in the rule.
func (*ClientImpl) ListPersonalAccessTokens ¶
func (client *ClientImpl) ListPersonalAccessTokens(ctx context.Context, args ListPersonalAccessTokensArgs) (*TokenAdminPagedSessionTokens, error)
[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) error
[Preview API] Revokes the listed OAuth authorizations.
type CreateRevocationRuleArgs ¶
type CreateRevocationRuleArgs struct { // (required) The revocation rule to create. The rule must specify a space-separated list of scopes, after which preexisting OAuth authorizations that match that any of the scopes will be rejected. For a list of all OAuth scopes supported by VSTS, see: https://docs.microsoft.com/en-us/vsts/integrate/get-started/authentication/oauth?view=vsts#scopes The rule may also specify the time before which to revoke tokens. RevocationRule *TokenAdminRevocationRule }
Arguments for the CreateRevocationRule function
type ListPersonalAccessTokensArgs ¶
type ListPersonalAccessTokensArgs struct { // (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 *[]TokenAdminRevocation // (optional) Set to false for PAT tokens and true for SSH tokens. IsPublic *bool }
Arguments for the RevokeAuthorizations function
type TokenAdminPagedSessionTokens ¶
type TokenAdminPagedSessionTokens struct { // The continuation token that can be used to retrieve the next page of session tokens, or <code>null</code> if there is no next page. ContinuationToken *uuid.UUID `json:"continuationToken,omitempty"` // The list of all session tokens in the current page. Value *[]delegatedauthorization.SessionToken `json:"value,omitempty"` }
A paginated list of session tokens. Session tokens correspond to OAuth credentials such as personal access tokens (PATs) and other OAuth authorizations.
type TokenAdminRevocation ¶
type TokenAdminRevocation struct { // The authorization ID of the OAuth authorization to revoke. AuthorizationId *uuid.UUID `json:"authorizationId,omitempty"` }
A request to revoke a particular delegated authorization.
type TokenAdminRevocationRule ¶
type TokenAdminRevocationRule struct { // A datetime cutoff. Tokens created before this time will be rejected. This is an optional parameter. If omitted, defaults to the time at which the rule was created. CreatedBefore *azuredevops.Time `json:"createdBefore,omitempty"` // A string containing a space-delimited list of OAuth scopes. A token matching any one of the scopes will be rejected. For a list of all OAuth scopes supported by Azure DevOps, see: https://docs.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/oauth?view=azure-devops#scopes This is a mandatory parameter. Scopes *string `json:"scopes,omitempty"` }
A rule which is applied to disable any incoming delegated authorization which matches the given properties.