-
Notifications
You must be signed in to change notification settings - Fork 126
adal4j with java 6 #301
Comments
@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. |
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. |
@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 |
@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 |
@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. |
Good evening,
I need to use adal4j on an old java 6 project. I am wondering where can I find an older version of adal4j that works with java 1.6, or what can I do to make it work. Any help?
Thank you
The text was updated successfully, but these errors were encountered: