Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add VkontakteClaimTypes
  • Loading branch information
khellang committed Feb 15, 2018
commit 961f480058afc04ff9fb81bf313281b024cfe48d
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public VkontakteAuthenticationOptions()
ClaimActions.MapJsonKey(ClaimTypes.GivenName, "first_name");
ClaimActions.MapJsonKey(ClaimTypes.Surname, "last_name");
ClaimActions.MapJsonKey(ClaimTypes.Hash, "hash");
ClaimActions.MapJsonKey("urn:vkontakte:photo:link", "photo");
ClaimActions.MapJsonKey("urn:vkontakte:photo_thumb:link", "photo_rec");
ClaimActions.MapJsonKey(VkontakteClaimTypes.PhotoUrl, "photo");
ClaimActions.MapJsonKey(VkontakteClaimTypes.ThumbnailUrl, "photo_rec");
}

/// <summary>
Expand Down
18 changes: 18 additions & 0 deletions src/AspNet.Security.OAuth.Vkontakte/VkontakteClaimTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers
* for more information concerning the license and the contributors participating to this project.
*/

namespace AspNet.Security.OAuth.Vkontakte
{
/// <summary>
/// Contains claim types specific to the <see cref="VkontakteAuthenticationHandler"/>.
/// </summary>
public static class VkontakteClaimTypes
{
public const string PhotoUrl = "urn:vkontakte:photo:link";

public const string ThumbnailUrl = "urn:vkontakte:photo_thumb:link";
}
}