GithubHelp home page GithubHelp logo

mpaktiti / rules Goto Github PK

View Code? Open in Web Editor NEW

This project forked from auth0/rules

0.0 1.0 0.0 1.25 MB

Rules are code snippets written in JavaScript that are executed as part of the authentication pipeline in Auth0

Home Page: https://auth0.com/docs/rules

License: MIT License

JavaScript 88.43% C# 11.06% CSS 0.41% ASP 0.10%

rules's Introduction

Auth0 Rules Repository

CircleCI

Rules are code snippets written in JavaScript that are executed as part of the authentication pipeline in Auth0. This happens every time a user authenticates to an application. Rules enable very powerful customizations and extensions to be easily added to Auth0.

An App initiates an authentication request to Auth0 (Step 1), Auth0 routes the request to an Identity Provider through a configured connection (Step 2). The user authenticates successfuly (Step3), the user object that represents the logged in user is then passed through the rules pipeline and returned to the app (Step 4).

A rule will run on Step 4 and this is the information each rule will get:

  • user: the user object as it comes from the identity provider.
  • context: an object containing contextual information of the current authentication transaction. It has the following properties:
    • clientID: the client id of the application the user is logging in to.
    • client_metadata: an optional object containing up to 10 key/value pairs
    • clientName: the name of the application (as defined on the dashboard).
    • connection: the name of the connection used to authenticate the user (e.g.: twitter or some-google-apps-domain)
    • connectionStrategy: the type of connection. For social connection connectionStrategy === connection. For enterprise connections, the strategy will be waad (Windows Azure AD), ad (Active Directory/LDAP), auth0 (database connections), etc.
    • protocol: the authentication protocol. Possible values: oidc-basic-profile (most used, web based login), oidc-implicit-profile (used on mobile devices and single page apps), oauth2-resource-owner (user/password login typically used on database connections), samlp (SAML protocol used on SaaS apps), wsfed (Ws-Federation used on Microsoft products like Office365), wstrust-usernamemixed (Ws-trust user/password login used on CRM and Office365)), delegation (during the exchange for a delegation token).
    • request: an object containing useful information of the request. It has the following properties:
      • query: querystring of the login transaction sent by the application
      • body: the body of the POST request on login transactions used on oauth2-resource-owner or wstrust-usernamemixed protocols.
      • userAgent: the user-agent of the client that is trying to log in.
      • ip: the originating IP address of the user trying to log in.
    • samlConfiguration: an object that controls the behavior of the SAML and WS-Fed endpoints. Useful for advanced claims mapping and token enrichment (only available for samlp and wsfed protocol).

This is the rules editor inside Auth0:


Available Modules


Release Notes

  1. Update the markdown files to update the rule and commit your changes
  2. Update the version by executing:
npm version [patch|minor|major]

There is a preversion script in the package.json file that executes the following command: ./build && git add rules.json && git commit -m 'update rules.json

  1. Push your changes to master including the tags
git push origin master --tags

Highlighted Rules

More information about them here.

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.

rules's People

Contributors

amaanc avatar beneliflo avatar brunokrebs avatar cristiandouce avatar dafortune avatar dschenkelman avatar eugeniop avatar fyockm avatar glena avatar glennblock avatar jerriep avatar jfromaniello avatar lobo avatar mgonto avatar mpaktiti avatar nicosabena avatar ntotten avatar pose avatar richet avatar rolodato avatar saltukalakus avatar sandrinodimattia avatar shawnmclean avatar siacomuzzi avatar tehsis avatar thameera avatar tophermarie avatar twistedstream avatar woloski avatar yvonnewilson avatar

Watchers

 avatar

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.