Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding calls to Web api in RazorPagesWeb-CSharp project template #225

Merged
merged 7 commits into from
Jun 19, 2020

Conversation

jmprieur
Copy link
Collaborator

@jmprieur jmprieur commented Jun 19, 2020

Adding the capability of calling a Web API to the webapi2 (RazorPagesWeb-CSharp) template
Contributes to #196

To test it:

msbuild /t:pack
cd bin\Debug
dotnet new -i Microsoft.Identity.Web.ProjectTemplates.0.1.5.nupkg
mkdir test
dotnet new webapp2 --auth SingleOrg --called-api-url "https://graph.microsoft.com/beta" --called-api-scopes "user.read"

to un-install the templates

cd bin\Debug
dotnet new -u Microsoft.Identity.Web.ProjectTemplates.0.1.4.nupkg

Also updating the test-templates.bat file to replace msbuild by dotnet build and test for webapp2 and mvc2 calling Web APIs.

@jmprieur jmprieur marked this pull request as draft June 19, 2020 18:13
@jmprieur jmprieur marked this pull request as ready for review June 19, 2020 19:29
@jmprieur jmprieur changed the title Updating the outstanding project templates Adding calls to Web api in RazorPagesWeb-CSharp project template Jun 19, 2020
… API" even without the flags to enable it (--called-api-url and --called-api-scopes)

Fixing the AuthorizeForScopes attribute in the Razor pages (which was added even when the webapp2 was not calling an API

Fixing the identity of the Web API 2.

Updating the test-templates.bat file to:
- add test for webapp2 and mvc2 calling Web APIs
- replace msbuild by dotnet build
@jmprieur
Copy link
Collaborator Author

Thanks @jennyf19

@jmprieur jmprieur merged commit 57184a3 into master Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants