GithubHelp home page GithubHelp logo

auth0api's Introduction

auth0api

The auth0api library is a minimalistic Auth0 management API client in R.

Installation

Using the 'devtools' package:

> install.packages("devtools")
> devtools::install_github("Appsilon/auth0-api")

CRAN

This package is still in the development phase and it has not been published on CRAN yet.

Usage

All endpoints are described in the Auth0 Managment API documentation. To generate the API token see auth0 tokens documentattion or auth0api::generate_token function documentation.

To use the API you need to set a domain and API token.

API token & domain

The token by default is read from an environment variable or can be passed as a param to the auth0 function.

# Set domain
set_domain("https://auth0-org-domain.aut0.com")
Sys.setenv(AUTH0_DOMAIN="organization-domain")
# Set the token
set_token("api-key")
Sys.setenv(AUTH0_API_KEY="api-key")

Custom endpoint

The API is minimalistic and you can easily access all endpoints in Auth0 Managment API.

auth0(endpoint, ..., .domain = NULL, .auth_key = api_token())

Use any endpoint from Auth0 API e.g. GET /api/v2/roles/{id}. The strings are interpolated using the glue library and as a paramaters of function use variable in brackets. See glue for more information.

auth0("GET /api/v2/users/{id}", id = "auth0|userid")

Predefined API endpoind:

The package contains predefined function allows to access the Auth0 API.

get_user("google-oauth2|1231231")

More help can be found in the package docs. For more information please contact [email protected]


Package development roadmap

  • Add more tests ๐Ÿš€
  • Improve error message e.g. returns Unauthorized
  • Add CI check to the repository
  • Add verbose and debug options
  • Improve documentation
  • Create more predefined functions
  • ...

auth0api's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

galachad

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.