diff --git a/Yavsc/src/Model/Identity/ApplicationUser.cs b/Yavsc/src/Model/Identity/ApplicationUser.cs index 51f66416..34cfbe6b 100644 --- a/Yavsc/src/Model/Identity/ApplicationUser.cs +++ b/Yavsc/src/Model/Identity/ApplicationUser.cs @@ -21,6 +21,9 @@ namespace Yavsc.Models [InverseProperty("Owner")] public virtual List Book { get; set; } + [InverseProperty("DeviceOwner")] + public virtual List Devices { get; set; } + [InverseProperty("Owner")] public virtual List Circles { get; set; } diff --git a/Yavsc/src/Model/Identity/MobileAppDeclaration.cs b/Yavsc/src/Model/Identity/MobileAppDeclaration.cs index 2a838a7e..ec886f5f 100644 --- a/Yavsc/src/Model/Identity/MobileAppDeclaration.cs +++ b/Yavsc/src/Model/Identity/MobileAppDeclaration.cs @@ -1,13 +1,15 @@ using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Yavsc.Models; public class GoogleCloudMobileDeclaration { - [Key] public string RegistrationId { get; set; } - - public string AuthToken { get; set; } - - public string AuthType { get; set; } + + public string DeviceOwnerId { get; set; } + + [ForeignKeyAttribute("DeviceOwnerId")] + public virtual ApplicationUser DeviceOwner { get; set; } } diff --git a/Yavsc/src/Providers/OAuthProvider.cs b/Yavsc/src/Providers/OAuthProvider.cs index a60b32c8..26cca142 100644 --- a/Yavsc/src/Providers/OAuthProvider.cs +++ b/Yavsc/src/Providers/OAuthProvider.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using AspNet.Security.OpenIdConnect.Extensions; @@ -122,7 +123,16 @@ namespace Yavsc.Providers { context.Validated(); } - - + + /// + /// List provided offline access tokens, to a given + /// user by its id + /// + /// + /// + public List GetOfflineTokens(string userid) { + + throw new NotImplementedException(); + } } } \ No newline at end of file