Giter Site home page Giter Site logo

fakedings's Introduction

fakedings - for local development

If in need of fake tokens, tailored for your needs, look no further!

fakedings is a fake OAuth2 authorization server issuing tokens without any security, made specifically for local development. It is a wrapper around the https://github.com/navikt/mock-oauth2-server, providing additional endpoints for known NAV use cases in terms of tokens.

โš ๏ธ DO NOT USE IN PRODUCTION

API endpoints

HTTP GET - Fake IdPorten token

https://fakedings.intern.dev.nav.no/fake/idporten

GET /fake/idporten
    ?pid=12345678910
    &acr=idporten-loa-high

Host: fakedings.intern.dev.nav.no

Response body:

eyJraWQiOiJtb2NrLW9hdXRoM......

Sample token

HTTP GET - Fake Azure AD token

https://fakedings.intern.dev.nav.no/fake/aad

GET /fake/aad
    ?preferred_username=[email protected]
    &name=You Only Live Once
    &azp=consumer-client-id
    &aud=receiver-client-id

Host: fakedings.intern.dev.nav.no

Response body:

eyJraWQiOiJtb2NrLW9hdXRoM......

Sample token

HTTP GET - Fake TokenX token

https://fakedings.intern.dev.nav.no/fake/tokenx

GET /fake/tokenx
    ?client_id=someclientid
    &aud=dev-gcp:targetteam:targetapp
    &acr=Level4
    &pid=12345678910

Host: fakedings.intern.dev.nav.no

Response body:

eyJraWQiOiJtb2NrLW9hdXRoM......

Sample token

HTTP POST - Fake any token, i.e. you can post any claims you want

https://fakedings.intern.dev.nav.no/fake/custom

Any form parameter sent in the application/x-www-form-urlencoded request will be added as a claim in the resulting token.

POST /fake/custom

Host: fakedings.intern.dev.nav.no
Content-Type: application/x-www-form-urlencoded

sub=mysub&
aud=myaudience&
mycustom=custom1
....

Response body:

eyJraWQiOiJtb2NrLW9hdXRoM......

Sample token

OpenID Connect discovery

https://fakedings.intern.dev.nav.no/fake/.well-known/openid-configuration

fakedings's People

Contributors

tommytroen avatar tronghn avatar jksolbakken 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.