summaryrefslogtreecommitdiffstats
path: root/projecttemplates/RelyingPartyLogic
diff options
context:
space:
mode:
Diffstat (limited to 'projecttemplates/RelyingPartyLogic')
-rw-r--r--projecttemplates/RelyingPartyLogic/Model.Designer.cs24
-rw-r--r--projecttemplates/RelyingPartyLogic/Model.edmx4
-rw-r--r--projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs1
3 files changed, 15 insertions, 14 deletions
diff --git a/projecttemplates/RelyingPartyLogic/Model.Designer.cs b/projecttemplates/RelyingPartyLogic/Model.Designer.cs
index 8884760..6f237a1 100644
--- a/projecttemplates/RelyingPartyLogic/Model.Designer.cs
+++ b/projecttemplates/RelyingPartyLogic/Model.Designer.cs
@@ -15,7 +15,7 @@
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("DatabaseModel", "FK_IssuedToken_User", "User", global::System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(RelyingPartyLogic.User), "ClientAuthorization", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(RelyingPartyLogic.ClientAuthorization))]
// Original file name:
-// Generation date: 7/14/2010 9:35:17 PM
+// Generation date: 7/22/2010 11:15:43 AM
namespace RelyingPartyLogic
{
@@ -1437,32 +1437,32 @@ namespace RelyingPartyLogic
[global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
partial void OnCreatedOnUtcChanged();
/// <summary>
- /// There are no comments for property ExpirationDate in the schema.
+ /// There are no comments for property ExpirationDateUtc in the schema.
/// </summary>
[global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
[global::System.Runtime.Serialization.DataMemberAttribute()]
[global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
- public global::System.Nullable<global::System.DateTime> ExpirationDate
+ public global::System.Nullable<global::System.DateTime> ExpirationDateUtc
{
get
{
- return this._ExpirationDate;
+ return this._ExpirationDateUtc;
}
set
{
- this.OnExpirationDateChanging(value);
- this.ReportPropertyChanging("ExpirationDate");
- this._ExpirationDate = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
- this.ReportPropertyChanged("ExpirationDate");
- this.OnExpirationDateChanged();
+ this.OnExpirationDateUtcChanging(value);
+ this.ReportPropertyChanging("ExpirationDateUtc");
+ this._ExpirationDateUtc = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value);
+ this.ReportPropertyChanged("ExpirationDateUtc");
+ this.OnExpirationDateUtcChanged();
}
}
[global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
- private global::System.Nullable<global::System.DateTime> _ExpirationDate;
+ private global::System.Nullable<global::System.DateTime> _ExpirationDateUtc;
[global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
- partial void OnExpirationDateChanging(global::System.Nullable<global::System.DateTime> value);
+ partial void OnExpirationDateUtcChanging(global::System.Nullable<global::System.DateTime> value);
[global::System.CodeDom.Compiler.GeneratedCode("System.Data.Entity.Design.EntityClassGenerator", "4.0.0.0")]
- partial void OnExpirationDateChanged();
+ partial void OnExpirationDateUtcChanged();
/// <summary>
/// There are no comments for property Scope in the schema.
/// </summary>
diff --git a/projecttemplates/RelyingPartyLogic/Model.edmx b/projecttemplates/RelyingPartyLogic/Model.edmx
index a003493..fd9f0fb 100644
--- a/projecttemplates/RelyingPartyLogic/Model.edmx
+++ b/projecttemplates/RelyingPartyLogic/Model.edmx
@@ -293,7 +293,7 @@
</Key>
<Property Type="Int32" Name="AuthorizationId" Nullable="false" a:StoreGeneratedPattern="Identity" xmlns:a="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
<Property Type="DateTime" Name="CreatedOnUtc" Nullable="false" />
- <Property Type="DateTime" Name="ExpirationDate" />
+ <Property Type="DateTime" Name="ExpirationDateUtc" Nullable="true" />
<Property Type="String" Name="Scope" MaxLength="2048" FixedLength="false" Unicode="false" />
<NavigationProperty Name="Client" Relationship="DatabaseModel.FK_IssuedToken_Consumer" FromRole="ClientAuthorization" ToRole="Client" />
<NavigationProperty Name="User" Relationship="DatabaseModel.FK_IssuedToken_User" FromRole="ClientAuthorization" ToRole="User" />
@@ -386,7 +386,7 @@
<EntityTypeMapping TypeName="DatabaseModel.ClientAuthorization">
<MappingFragment StoreEntitySet="ClientAuthorization">
<ScalarProperty Name="Scope" ColumnName="Scope" />
- <ScalarProperty Name="ExpirationDate" ColumnName="ExpirationDate" />
+ <ScalarProperty Name="ExpirationDateUtc" ColumnName="ExpirationDate" />
<ScalarProperty Name="CreatedOnUtc" ColumnName="CreatedOn" />
<ScalarProperty Name="AuthorizationId" ColumnName="AuthorizationId" />
</MappingFragment>
diff --git a/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs b/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
index 3dafa0a..91a2ac3 100644
--- a/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
+++ b/projecttemplates/RelyingPartyLogic/OAuthAuthorizationServer.cs
@@ -151,6 +151,7 @@ namespace RelyingPartyLogic {
where
auth.Client.ClientIdentifier == clientIdentifier &&
auth.CreatedOnUtc <= issuedUtc &&
+ (!auth.ExpirationDateUtc.HasValue || auth.ExpirationDateUtc.Value >= DateTime.UtcNow) &&
auth.User.AuthenticationTokens.Any(token => token.ClaimedIdentifier == username)
select auth.Scope;