gitlab

package
v3.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DisplayName = "GitLab"
View Source
const ProviderName = "gitlab"

Variables

View Source
var Scopes = []string{"read_user", "api"}

Functions

This section is empty.

Types

type Client

type Client interface {
	Groups(*http.Client) ([]string, error)
}

func NewClient

func NewClient(baseURL string) Client

type GitLabAuthConfig

type GitLabAuthConfig struct {
	ClientID     string `json:"client_id"     long:"client-id"     description:"Application client ID for enabling GitLab OAuth."`
	ClientSecret string `json:"client_secret" long:"client-secret" description:"Application client secret for enabling GitLab OAuth."`

	Groups   []string `json:"groups,omitempty" long:"group"  description:"GitLab group whose members will have access." value-name:"GROUP"`
	AuthURL  string   `json:"auth_url,omitempty"      long:"auth-url"      description:"Override default endpoint AuthURL for GitLab."`
	TokenURL string   `json:"token_url,omitempty"     long:"token-url"     description:"Override default endpoint TokenURL for GitLab."`
	APIURL   string   `json:"api_url,omitempty"       long:"api-url"       description:"Override default API endpoint URL for GitLab."`
}

func (*GitLabAuthConfig) AuthMethod

func (*GitLabAuthConfig) AuthMethod(oauthBaseURL string, teamName string) atc.AuthMethod

func (*GitLabAuthConfig) IsConfigured

func (auth *GitLabAuthConfig) IsConfigured() bool

func (*GitLabAuthConfig) Validate

func (auth *GitLabAuthConfig) Validate() error

type GitLabGroupConfig

type GitLabGroupConfig struct {
	GroupName string `json:"group_name,omitempty"`
}

type GitLabProvider

type GitLabProvider struct {
	*oauth2.Config
	verifier.Verifier
}

func (GitLabProvider) PreTokenClient

func (GitLabProvider) PreTokenClient() (*http.Client, error)

type GitLabTeamProvider

type GitLabTeamProvider struct {
}

func (GitLabTeamProvider) AddAuthGroup

func (GitLabTeamProvider) AddAuthGroup(group *flags.Group) provider.AuthConfig

func (GitLabTeamProvider) ProviderConstructor

func (GitLabTeamProvider) ProviderConstructor(
	config provider.AuthConfig,
	redirectURL string,
) (provider.Provider, bool)

func (GitLabTeamProvider) UnmarshalConfig

func (GitLabTeamProvider) UnmarshalConfig(config *json.RawMessage) (provider.AuthConfig, error)

type GroupVerifier

type GroupVerifier struct {
	// contains filtered or unexported fields
}

func NewGroupVerifier

func NewGroupVerifier(
	groups []string,
	gitLabClient Client,
) GroupVerifier

func (GroupVerifier) Verify

func (verifier GroupVerifier) Verify(logger lager.Logger, httpClient *http.Client) (bool, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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