gitlab

package
v3.19.6 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PerformOAuth2Authentication

func PerformOAuth2Authentication(ctx context.Context) (*oauth2.Token, error)

PerformOAuth2Authentication uses Authorization code with Proof Key for Code Exchange (PKCE) to perform a secret-less OAuth2 authentication. See https://docs.gitlab.com/ee/api/oauth2.html#authorization-code-with-proof-key-for-code-exchange-pkce for more details.

func RotatePersonalAccessToken

func RotatePersonalAccessToken(gitLabInstance string, expiresAt string, toRotate, writeToken string) (string, string, error)

RotatePersonalAccessToken uses the GitLab API to exchange a token for a new one.

func VerifyToken

func VerifyToken(gitLabInstance string, gitLabToken string) (username string, err error)

VerifyToken will verify the caller identity given creds, and return some useful information about the account.

Types

This section is empty.

Jump to

Keyboard shortcuts

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