From 56ddfa03de3fadf8e7d1c24d11160b265168e91d Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 30 May 2016 13:54:52 +0200 Subject: [PATCH] =?UTF-8?q?WIP=20p=C3=A9rif=C3=A9riques=20utilisateur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yavsc/src/Model/Identity/ApplicationUser.cs | 3 +++ Yavsc/src/Model/Identity/MobileAppDeclaration.cs | 12 +++++++----- Yavsc/src/Providers/OAuthProvider.cs | 14 ++++++++++++-- 3 files changed, 22 insertions(+), 7 deletions(-) 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