Socket
Socket
Sign inDemoInstall

gitlab-swagger-client-auth

Package Overview
Dependencies
16
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitlab-swagger-client-auth

Helper for gitlab-swagger-client which requests and stores authentication details for GitLab


Version published
Weekly downloads
2
Maintainers
1
Install size
182 kB
Created
Weekly downloads
 

Readme

Source

gitlab-swagger-client-auth

Installation

npm install gitlab-swagger-client gitlab-swagger-client-auth -S

Configuration

// $HOME/.gitlab-swagger-client-authrc
{
  "gitlab": {
    "baseUrl": "https://gitlab.com/api/v3", // Defaults to https://gitlab.com/api/v3
    "token": "MY_API_TOKEN" // From https://gitlab.com/profile/account or https://gitlab.com/profile/personal_access_tokens
  }
}

The config file is loaded using rc, so config is merged from the following JSON/INI files (if they exist, in order of precedence):

  • Environment variables (e.g., $gitlab_swagger_client_auth_gitlab__baseUrl)
  • A .gitlab-swagger-client-authrc in the current directory (or the first found by navigating up the CWD path)
  • $HOME/.gitlab-swagger-client-authrc
  • $HOME/.gitlab-swagger-client-auth/config
  • $HOME/.config/gitlab-swagger-client-auth
  • $HOME/.config/gitlab-swagger-client-auth/config
  • /etc/gitlab-swagger-client-authrc
  • /etc/gitlab-swagger-client-auth/config

Usage

import { GroupsApi } from 'gitlab-swagger-client';
import createGitlabApi from 'gitlab-swagger-client-auth';

const groupsApi = createGitlabApi(GroupsApi);

Development

Integration tests

To run the integration tests, you will need to provide an access token for the gitlab.com API (obtained via the Web API). Run the following command to set the token in your NPM config:

npm config set gitlab-swagger-client-auth:gitlab-token TOKEN

Note, this is only used to make read requests against the gitlab-org group and doesn't access/modify any of your own data.

Keywords

FAQs

Last updated on 03 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc