adal

ADAL for java: Resolving dependencies for java client app sample

蓝咒 提交于 2020-01-06 17:57:50
问题 Are there any instructions available to run public-client-app-sample in ADAL for Java ? After building the sample jar and library jar files, an attempt to run "java -cp adal4j-0.1.0.jar;public-client-app-sample.jar PublicClient" yields (after entering the credentials) Exception in thread "main" java.lang.NoClassDefFoundError: com/nimbusds/oauth2/s dk/AuthorizationGrant. What would be the appropriate classpath or is there a maven target? 回答1: I just updated the code to include exec plugin in

ADAL for java: Resolving dependencies for java client app sample

我只是一个虾纸丫 提交于 2020-01-06 17:56:08
问题 Are there any instructions available to run public-client-app-sample in ADAL for Java ? After building the sample jar and library jar files, an attempt to run "java -cp adal4j-0.1.0.jar;public-client-app-sample.jar PublicClient" yields (after entering the credentials) Exception in thread "main" java.lang.NoClassDefFoundError: com/nimbusds/oauth2/s dk/AuthorizationGrant. What would be the appropriate classpath or is there a maven target? 回答1: I just updated the code to include exec plugin in

Xamarin ADAL AcquireTokenAsync not returning result! OnActivityResult is hit

冷暖自知 提交于 2020-01-06 07:22:14
问题 I have a xamarin.android app and am using ADAL to authenticate. I have an AuthService that calls var authResultAsync = await authContext.AcquireTokenAsync(...); This call never returns an AuthenticationResult object but rather I just hit my OnActivityResult and I am never able to access my token?? protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) { base.OnActivityResult(requestCode, resultCode, data); AuthenticationContinuationHelper

AcquireTokenAsync failed with UserAssertion in Web API

只谈情不闲聊 提交于 2020-01-06 07:09:01
问题 A Web API has been developed which uses ADAL .Net v3.14 for authentication. Now here is code to get access_token (Using default TokenCache provided by ADAL) var provider = "https://login.microsoftonline.com/XXXXXXXX.onmicrosoft.com" var service = "https://XXXXXXXX.onmicrosoft.com/XXXXXXService" //which is registered as service in Azure AD var clientId = "01d2b529-XXXX-XXXX-b794-XXXXXXXXXXXX" //client app registered on Azure AD AuthenticationContext authContext = new AuthenticationContext

Angular 2 ADAL token refresh, for implicit flow (using “adal-angular4”)

旧街凉风 提交于 2020-01-05 08:16:30
问题 There seems to be no practical way of refreshing the token in implicit flow. Has anyone been able to achieve this? MS documentation suggests doing the refresh in an Iframe, looking for suggestions of what methods to cal in adal ng2 or adal js!!! Edit: I'm using this library https://github.com/benbaran/adal-angular4 EDIT: Don't use the aforementioned library, it's a real POS 回答1: Using implicit flow you are not refreshing the current token, you need to get a new one. Here is how I am handling

Validating ADAL JWT token in C# REST service

僤鯓⒐⒋嵵緔 提交于 2020-01-03 09:03:09
问题 I have a web application which uses the ADAL library for authentication through Azure Active Directory. This web application makes a call to a C# REST service by passing the ADAL token string as a parameter. In my REST service, I want to validate this token. If the token is valid only then the service will perform the operation. I searched a lot but could not find a way to validate the JWT token in my rest service. Can you guys please help me on this? 回答1: You have two options: 1. Use OWIN

Validating ADAL JWT token in C# REST service

随声附和 提交于 2020-01-03 09:01:08
问题 I have a web application which uses the ADAL library for authentication through Azure Active Directory. This web application makes a call to a C# REST service by passing the ADAL token string as a parameter. In my REST service, I want to validate this token. If the token is valid only then the service will perform the operation. I searched a lot but could not find a way to validate the JWT token in my rest service. Can you guys please help me on this? 回答1: You have two options: 1. Use OWIN

access_token same as id_token when trying to acquire access token with ADAL.js AuthenticationContext?

别说谁变了你拦得住时间么 提交于 2020-01-03 08:37:13
问题 I am authenticating my Single Page App (Angular4) with Azure AD, and using Adal.js for the same. On the login page, I click a button that redirects to Microsoft AAD and upon successful login it redirects back to application home page, and receives id_token and user info from JWT. I need the access_token for back-end API access, which I am trying to acquire through the the ADAL AuthenticationContext 's getCachedToken() method, and sending the clientId as parameter: this.context.getCachedToken

How do I secure an Azure Mobile Service with Azure AD? ADAL.JS

大憨熊 提交于 2020-01-02 20:18:33
问题 I have created an application in my Azure AD. I switch into the Mobile Service and go to the identity tab. For MS identity is asks for a client ID. I found the Client ID in the Azure AD configure tab. However, I had no idea what to use for Client Secret and Package SID. It seems like it is expecting you are using a Windows Store app to access the service rather than a Javascript app which is what I am working with. So, my question is, how do you secure an Azure Mobile Service with Azure AD

ADAL js does not work in IE when acquiring token for remote endpoint

妖精的绣舞 提交于 2020-01-02 08:29:27
问题 ADAL.js does not work in IE when acquiring token for remote endpoint. The sample "https://github.com/AzureADSamples/SinglePageApp-WebAPI-AngularJS-DotNet" suggests to uncomment line of code: "cacheLocation: 'localStorage', // enable this for IE, as sessionStorage does not work for localhost." But apparently it doesn't help. Running the application side by side in IE and Chrome. Chrome works just fine. IE logs this error to console: Error :login_required Error description:AADSTS50058: User