Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions LearningHub.Nhs.WebUI/Controllers/OpenAthensController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ public ActionResult Login(string returnUrl, bool invalidScope = false)
return this.View();
}

if (string.IsNullOrWhiteSpace(this.authConfig.ClientId) || string.IsNullOrWhiteSpace(this.Settings.LearningHubWebUiUrl))
{
throw new Exception("ClientId or origin are empty.");
}

var authUri = OpenAthensOpenIdConnect.GetAuthServerUri(this.authConfig, this.Settings, returnUrl);

return this.Redirect(authUri.AbsoluteUri);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ REFERENCES [resources].[ResourceReference] ([Id])
GO

ALTER TABLE [resources].[ExternalReference] CHECK CONSTRAINT [FK_ExternalReference_ResourceReference]
GO
CREATE NONCLUSTERED INDEX [IX_Resources_ExternalReference_ExternalReference_Deleted] ON [resources].[ExternalReference]([ExternalReference], [Deleted])
GO
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ GO

ALTER TABLE [resources].[ScormResourceVersion] ADD CONSTRAINT [FK_ScormResourceVersion_EsrLinkType] FOREIGN KEY([EsrLinkTypeId])
REFERENCES [resources].[EsrLinkType] ([Id])
GO
CREATE NONCLUSTERED INDEX [IX_Resources_ScormResourceVersion_ResourceVersionId] ON [resources].[ScormResourceVersion]([ResourceVersionId])
GO
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ GO
ALTER TABLE [resources].[ScormResourceVersionManifest] ADD CONSTRAINT [FK_ScormResourceVersionManifest_ScormResourceVersion] FOREIGN KEY([ScormResourceVersionId])
REFERENCES [resources].[ScormResourceVersion] ([Id])
GO
CREATE NONCLUSTERED INDEX [IX_Resources_ScormResourceVersionManifest_ScormResourceVersionId_ManifestURL]ON [resources].[ScormResourceVersionManifest] ([ScormResourceVersionId])INCLUDE ([ManifestURL])
GO