Git Product home page Git Product logo

company-structure-spring-security-oauth2-authorities's People

Contributors

adamzareba avatar

Stargazers

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

company-structure-spring-security-oauth2-authorities's Issues

Assigning role to existing tokens

first of all thanks u so much for sharing your knowledge.
i have a lot of existing token in my oath_access_token table, and as is see from your project roles and authorities are being stored in created token by token creation request. my question is what should i do for my existing tokens ? my user tokens are created at right now when i give some role to my users the created token does not change and what should i do for that?

Error : org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available

I have imported this project in eclipse and then converted same into maven , The maven build was successful but while running the Application.java getting error as "Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'companyController': Unsatisfied dependency expressed through field 'companyService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'companyServiceImpl': Unsatisfied dependency expressed through field 'companyRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyRepositoryImpl': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.persistence.EntityManagerFactory' available"

Error With Classes

Error while importing project .
Department_,Employee_,Company_ Classes not found

java.lang.ClassNotFoundException: com.adamzareba.spring.security.oauth2.model.security.Authority

Hi,

The code is working fine. But when i change the package name of Authority class i get this exception. Can't I change it ? Below is the logs.

Old package : com.adamzareba.spring.security.oauth2.model.security.Authority

New package : com.mycompany.model.security.Authority

2020-06-29 23:28:48.544 [0;39m [33m WARN [0;39m [35m8968 [0;39m [2m--- [0;39m [2m[nio-8080-exec-5] [0;39m [36mo.s.s.o.p.token.store.JdbcTokenStore [0;39m [2m: [0;39m Failed to deserialize authentication for cb7aab39-c5d5-430b-9dac-818c96bb456c

java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: com.adamzareba.spring.security.oauth2.model.security.Authority
at org.springframework.security.oauth2.common.util.SerializationUtils.deserialize(SerializationUtils.java:50) ~[spring-security-oauth2-2.0.14.RELEASE.jar:na]
at org.springframework.security.oauth2.provider.token.store.JdbcTokenStore.deserializeAuthentication(JdbcTokenStore.java:405) [spring-security-oauth2-2.0.14.RELEASE.jar:na]
at org.springframework.security.oauth2.provider.token.store.JdbcTokenStore$3.mapRow(JdbcTokenStore.java:198) ~[spring-security-oauth2-2.0.14.RELEASE.jar:na]
at org.springframework.security.oauth2.provider.token.store.JdbcTokenStore$3.mapRow(JdbcTokenStore.java:196) ~[spring-security-oauth2-2.0.14.RELEASE.jar:na]
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:93) ~[spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60) ~[spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:667) ~[spring-jdbc-5.0.6.RELEASE.jar:5.0.6.RELEASE]

Company_, Department_ and the likes (with underscore) not found...

Hello,

first off: thank you for this example. I am trying / struggling to understand how to work with OAuth2, ResourceServer etc. and found your post about it on DZone (https://dzone.com/articles/secure-spring-rest-with-spring-security-and-oauth2).

After reading through it, I decided to try out the example you offered here on GitHub, but I am having a problem.

I cloned and imported the project into Eclipse, but while it does build via maven (which is odd), it keeps showing errors in Eclipse, namely, that it cannot find Company_, Department_ and Employee_. I have no clue as to why.

I thought the classes with underscore were a feature of Lombok or something, but all of the missing classes mentioned above are imported in CompanyRepositoryImpl and used for static access - so I guess that there once were classes like that?
I suppose it's not a big deal to fix that (apparently it is a static list or array containing some example objects from the SQL-files?); then again perhaps they are ought to be already there and I am just doing something wrong?

Do you know what else I might have to do?

Wont boot up

Error:java: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

Error in CompamyRepositoryImpl

company repository impl contains a lots of issue please fix it
and help me please
import com.adamzareba.spring.security.oauth2.model.Employee_; not found errors on these lines
and where you use in the code

Signup problem

When I adding new user into users with ID=5 and want to add into user_authorities record (5,2) with ROLE_MEMBER. How to do this.

Thank You

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.