Added endpoint and functionality for getting, retrieving and deleting bookmarks, and for adding and removing tags for a bookmark
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using YABA.Common.Extensions;
|
||||
using YABA.Common.Lookups;
|
||||
|
||||
namespace YABA.API.Extensions
|
||||
|
||||
@ -1,18 +0,0 @@
|
||||
using System.Security.Claims;
|
||||
using System.Security.Principal;
|
||||
using YABA.Common.Extensions;
|
||||
using YABA.Common.Lookups;
|
||||
|
||||
namespace YABA.API.Extensions
|
||||
{
|
||||
public static class UserIdentityExtensions
|
||||
{
|
||||
public static string GetAuthProviderId(this IIdentity identity) => GetCustomClaim(identity, ClaimsLookup.AuthProviderId);
|
||||
|
||||
public static string GetCustomClaim(this IIdentity identity, ClaimsLookup claim)
|
||||
{
|
||||
var claimsIdentity = identity as ClaimsIdentity;
|
||||
return claimsIdentity.FindFirst(claim.GetClaimName())?.Value.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user