Giter Club home page Giter Club logo

spring-kotlin-jwt's Introduction

spring-kotlin-jwt

playground for spring-boot, kotlin , jwt, auth0 ...

poc:

  • parse jwt custom claims (incl. namespaces),
  • self-signed jwt for pragmatic local development

build and run

$ ./gradlew bootRun

Browse to ...

GIVEN: example jwt

{
  "https://example-company.com/claims/userid": "USERID-FAKE",
  "https://example-company.com/claims/given_name": "Bat",
  "https://example-company.com/claims/family_name": "Man",
  "https://example-company.com/claims/email": "[email protected]",
  "https://awesome-app.example-company.com/claims/roles": [
    "example-role-A",
    "example-role-B"
  ],
  "iss": "https://example-company.eu.auth0.com/",
  "sub": "stuff|example-stuff|USERID-FAKE",
  "aud": [
    "https://awesome-app.example-company.com/api/",
    "https://example-company.eu.auth0.com/userinfo"
  ],
  "iat": 1516794458,
  "exp": 1516880858,
  "azp": "azp-example",
  "scope": "openid profile email"
}

WHEN: run application - using auth-strategy: JWT_FAKE

THEN: example api response

{
  "now": "2018-02-16T05:39:19.280Z",
  "user": {
    "userId": "USERID-FAKE",
    "email": "[email protected]",
    "givenName": "Bat",
    "familyName": "Man"
  },
  "auth": {
    "authorities": [
      "openid",
      "profile",
      "email",
      "example-role-A",
      "example-role-B"
    ],
    "roles": [
      "example-role-A",
      "example-role-B"
    ],
    "scopes": [
      "openid",
      "profile",
      "email"
    ]
  }
}

spring-kotlin-jwt's People

Contributors

bastman avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.