Last active
November 4, 2019 19:27
-
-
Save alexlvovich/97ab02e79eceb02009d97dfed0d01903 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @ApiResourceId INT; | |
DECLARE @ClientId INT = 6; -- here is your client api which will use local api | |
-- add api resource for your local api | |
INSERT [dbo].[ApiResources] ([Enabled], [Name], [DisplayName], [Created], [NonEditable]) | |
VALUES (1, 'apiAuth', 'Auth API', GETDATE(), 0) | |
SET @ApiResourceId = SCOPE_IDENTITY() | |
-- insert api scope | |
INSERT [dbo].[ApiScopes] ([Name], [DisplayName], [Description], [Required], [Emphasize], [ShowInDiscoveryDocument], [ApiResourceId]) | |
VALUES ('IdentityServerApi', 'Auth API', null, 0, 0, 1, @ApiResourceId) | |
-- insert client | |
INSERT [dbo].[ClientScopes] ([Scope], [ClientId]) | |
VALUES ('IdentityServerApi', @ClientId) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment