xdoo / vaadin-demo

demo using vaadin with spring boot.
4 stars 2 forks source link

JWT Tokens mit OAuth2 #93

Closed peter-mueller closed 8 years ago

peter-mueller commented 9 years ago

Man könnte einen OAuth Server mit JWT tokens bauen, die die ROLES/PERM enthalten.

Dazu muss man die Bestätigung des Nutzers abstellen:

public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
      clients.inMemory()
          .withClient("acme")
          .secret("acmesecret")
          .autoApprove(true) // Keine Meldung zur Bestätigung des Zugriffs anzeigen
          .authorizedGrantTypes("password")
          .scopes("scope");
}

Also ohne das:

Evtl. hab ich das aber auch falsch verstanden bzw. ist das OverKill.

darenegade commented 9 years ago

diverse Artikel:

https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2 (Allgemein OAuth)

http://technicalrex.com/2015/02/20/stateless-authentication-with-spring-security-and-jwt/
(Nicht für unser Vorhaben geeignet)

http://massimilianosciacco.com/spring-security-jwt-authentication (Nicht für unser Vorhaben geeignet)

xdoo commented 8 years ago

Noch ein schöner Artikel über JWT im Allgemeinen. Die Kommentare unter der Artikel sind zum Teil auch ganz hilfreich: http://angular-tips.com/blog/2014/05/json-web-tokens-introduction/

darenegade commented 8 years ago

Guter Artikel über die Umsetzung von OAuth mit microservices http://callistaenterprise.se/blogg/teknik/2015/04/27/building-microservices-part-3,%20secure%20API%27s%20with%20OAuth/

Anleitung von Spring, die nicht ganz passt, aber trotzdem hilfreich war: https://spring.io/blog/2015/02/03/sso-with-oauth2-angular-js-and-spring-security-part-v