Code Monkey home page Code Monkey logo

Comments (10)

bill-blackmon avatar bill-blackmon commented on July 20, 2024 2

This example is broken. Please see item #3 and post solution. stewartadams hints, while useful, do not solve the problem. Nor do the 'See also:' items above. These issues have been opened for an entire month with no resolution. You need to keep up!

from azure-docs-sdk-java.

stewartadam avatar stewartadam commented on July 20, 2024 1

FWIW, if you're looking for something that works with Spring 5, I published my own sample here:
https://github.com/stewartadam/azuread-springsecurity5-oauth2-kickstart

It uses the built-in OAuth 2 support for Spring Security for Spring 5 instead of the add-on spring-security-oauth2 package, which is no longer compatible with Spring 5.

from azure-docs-sdk-java.

stewartadam avatar stewartadam commented on July 20, 2024

See also:
microsoft/azure-spring-boot#244
https://stackoverflow.com/questions/49170814/azure-active-directory-with-spring

from azure-docs-sdk-java.

tschn avatar tschn commented on July 20, 2024

any idea on when this example will be fixed?

from azure-docs-sdk-java.

rmcmurray avatar rmcmurray commented on July 20, 2024

@tschn - we are working on that article now; we should have an update soon.

from azure-docs-sdk-java.

jason279 avatar jason279 commented on July 20, 2024

@brunoborges any updating for the issue? Still get the "A redirect is required to get the users approval" exception. Is there anyone can help to fix it?
Thanks!!

from azure-docs-sdk-java.

rmcmurray avatar rmcmurray commented on July 20, 2024

@jason279 - I am experiencing the same issue that you are seeing, and we are currently looking into that.

However, for now you can use the example azure-active-directory-spring-boot-sample application as a starting point for building an application; that sample has been tested and it works as expected.

from azure-docs-sdk-java.

jason279 avatar jason279 commented on July 20, 2024

OK. Thanks @rmcmurray .

from azure-docs-sdk-java.

rmcmurray avatar rmcmurray commented on July 20, 2024

@stewartadam, @jason279, and @tschn - we've made changes the the Spring starter which resolve the issues that you were seeing, and we've updated the article accordingly:

https://docs.microsoft.com/java/azure/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory

Thanks!

from azure-docs-sdk-java.

GauravWable avatar GauravWable commented on July 20, 2024

Error in import (HelloController.java):
The import org.springframework.security.access.prepost.PreAuthorize cannot be resolved

@PreAuthorize cannot be resolved to a type

And
(WebSecurityConfig.java)
The type org.springframework.security.authentication.AuthenticationManager cannot be resolved. It is indirectly referenced from required .class files

These .class files are present under dependencies but there are errors in import.
Maven Dependencies > spring-security-core-5.0.6.RELEASE.jar

Please help to resolve these errors. Thanks.

from azure-docs-sdk-java.

Related Issues (20)

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.