Code Monkey home page Code Monkey logo

Comments (7)

sangonzal avatar sangonzal commented on June 25, 2024 1

@GiamBoscaro The most straightforward way would probably be to create the Http request yourself. You would use client credentials grant. This doc shows the required parameters. You could also use an Java Oauth2 library that supports Java 6 if that makes it easier for you.

Closing this issue as it's no longer related to ADAL.

from azure-activedirectory-library-for-java.

sangonzal avatar sangonzal commented on June 25, 2024

@GiamBoscaro The library uses Java 7 features throughout the codebase, so it will not work with Java 6. If really needed (not recommending this) you could fork the code and try to removing them. I haven't looked into this, so not sure how much work it would be. Would it be possible to update the project you are working on to use Java 7?

Also note that ADAL is deprecated and will not receive updates moving forward. Instead we recommend customers use MSAL. MSAL requires Java 8 or higher.

from azure-activedirectory-library-for-java.

GiamBoscaro avatar GiamBoscaro commented on June 25, 2024

I know it is deprecated, but the project I am working on it's really old and I just need to make it work for a year more or so. Porting to java 7 it is becoming a real pain so I'd just like to find a way to make adal4j work on java 1.6 or maybe find an alternative library.

from azure-activedirectory-library-for-java.

sangonzal avatar sangonzal commented on June 25, 2024

@GiamBoscaro What scenarios are you trying to support in your application?

from azure-activedirectory-library-for-java.

GiamBoscaro avatar GiamBoscaro commented on June 25, 2024

@GiamBoscaro What scenarios are you trying to support in your application?

I need to do a few calls to a new api that is authenticated via azure. I'll be as lazy as possible so I'll probably just need to get the token every api call, set the header and send the request

from azure-activedirectory-library-for-java.

sangonzal avatar sangonzal commented on June 25, 2024

@GiamBoscaro Is your application a desktop app/ command line app or a web app/ web API? Do you need to get tokens for an user or for your application? The different ways that ADAL acquires tokens are explained here.

from azure-activedirectory-library-for-java.

GiamBoscaro avatar GiamBoscaro commented on June 25, 2024

@GiamBoscaro Is your application a desktop app/ command line app or a web app/ web API? Do you need to get tokens for an user or for your application? The different ways that ADAL acquires tokens are explained here.

It's a web application. I only have an application ID and secret, so I need to authenticate the application but not the user. I should refresh this token every 30 mins-1hr, but I'll just be lazy and just send a new auth request before every api call.

I have already read the guide on how to acquire tokens and indeed it works (from what I remember I was using the method acquireTokenByAuthorizationCode(String authorizationCode, URI redirectUri, ClientCredential credential, AuthenticationCallback callback). But obviously it works only in a Java 7 environment. I get unsupported major.minor version 51.0 when I try to run even the simplest code in Java 6.

from azure-activedirectory-library-for-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.