MarcTron.ADAL 1.1.0

MTADAL Plugin for Xamarin and Windows

This package, built on top of the original Active Directory Authentication Library (ADAL), makes extremely easy to authenticate users inside your Xamarin projects. You only need 1 line of code!

Install-Package MarcTron.ADAL -Version 1.1.0
dotnet add package MarcTron.ADAL --version 1.1.0
<PackageReference Include="MarcTron.ADAL" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MarcTron.ADAL --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

MTADAL Plugin for Xamarin

It is avery intuitive Plugin to use Microsoft Active Directory Authentication on Xamarin.
It requires only 1 line of code.

What is this repository for?

You can learn more about MTADAL and this plugin on https://www.xamarinexpert.it/blog/adal-made-easy/

LINKS

Available on Nuget: https://www.nuget.org/packages/MarcTron.ADAL/
Project website: http://www.xamarinexpert.it/Plugin/MTADAL/
Tutorial: https://www.xamarinexpert.it/blog/adal-made-easy/
To report any issue: https://bitbucket.org/marcojak81/mtadal

SETUP

Install into your PCL/.NetStandard project and Client projects.
The nuget package will automatically install the Microsoft.IdentityModel.Clients.ActiveDirectory package version 4.5.1

HOT TO USE IT

To authenticate a user using Active Directory you just need this line of code:

AuthenticationResult data = await MarcTron.Plugin.MTADAL.Current.Authenticate(Authority, GraphResourceUri, ClientId, ReturnUri);

where

Authority
GraphResourceUri
ClientId
ReturnUri

are strings configured according to your Active Directory.

ADDITIONAL INFO

this Plugin exposes other two methods:

HasLoginData(Authority): to check if a token is already present inside the ADAL cache

Logout(Authority) : With this method you can allow the user to log out clearing the ADAL cache

IMPORTANT FOR ANDROID

Add the following override to your MainActivity file (in your Android project).

protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
	base.OnActivityResult(requestCode, resultCode, data);
	AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
}

Without this method, your project will not get a response from Active Directory

Supported Platforms

  • Android
  • iOS
  • UWP

MTADAL Plugin for Xamarin

It is avery intuitive Plugin to use Microsoft Active Directory Authentication on Xamarin.
It requires only 1 line of code.

What is this repository for?

You can learn more about MTADAL and this plugin on https://www.xamarinexpert.it/blog/adal-made-easy/

LINKS

Available on Nuget: https://www.nuget.org/packages/MarcTron.ADAL/
Project website: http://www.xamarinexpert.it/Plugin/MTADAL/
Tutorial: https://www.xamarinexpert.it/blog/adal-made-easy/
To report any issue: https://bitbucket.org/marcojak81/mtadal

SETUP

Install into your PCL/.NetStandard project and Client projects.
The nuget package will automatically install the Microsoft.IdentityModel.Clients.ActiveDirectory package version 4.5.1

HOT TO USE IT

To authenticate a user using Active Directory you just need this line of code:

AuthenticationResult data = await MarcTron.Plugin.MTADAL.Current.Authenticate(Authority, GraphResourceUri, ClientId, ReturnUri);

where

Authority
GraphResourceUri
ClientId
ReturnUri

are strings configured according to your Active Directory.

ADDITIONAL INFO

this Plugin exposes other two methods:

HasLoginData(Authority): to check if a token is already present inside the ADAL cache

Logout(Authority) : With this method you can allow the user to log out clearing the ADAL cache

IMPORTANT FOR ANDROID

Add the following override to your MainActivity file (in your Android project).

protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
	base.OnActivityResult(requestCode, resultCode, data);
	AuthenticationAgentContinuationHelper.SetAuthenticationAgentContinuationEventArgs(requestCode, resultCode, data);
}

Without this method, your project will not get a response from Active Directory

Supported Platforms

  • Android
  • iOS
  • UWP

Release Notes

Version 1.1
       This version has been rewritten using multitargeting.
       Microsoft Active Directory updated to version 4.5.1

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0 194 3/1/2019
1.0.5 302 7/25/2018
1.0.4 220 6/21/2018
1.0.3 210 6/14/2018
1.0.2 247 3/28/2018
1.0.1 228 3/1/2018
1.0.0 184 3/1/2018