- Multi Project Debug
-
SSL
cd "c:\Program Files (x86)\IIS Express"
IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44385/ -UseSelfSigned
IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44386/ -UseSelfSigned
IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44310/ -UseSelfSigned
IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44302/ -UseSelfSigned
IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:44303/ -UseSelfSigned
- Debug and trust all certificate trust prompts
-
Client UI
- Run the following cmd to build the client ui. See this script and the gulp scipts found at AdminUI and Identity server.
PowerShell.exe -ExecutionPolicy Bypass -File src/AdminUI/build-client.ps1
You may need to run twice. The database will be created for you but if it doesn't exist, it may have a hiccup. Just run again.
See Admin Seed Data. All the clients, resources, scopes wil have been created for you. You can delete them in the ui and next time your run, they will be created again. See Identity Seed Data to see the admin user login. It is recomended you register another user. You can assign that user the Administrator role to keep admin clean.
- API: Swagger is configured with correct client credentials already
-
First thing, register a user so you don't use the admin user to do things.
-
Try out the swagger api page and try calling the api with different combinations of scopes and not authorized. Try runnimng the post api endpoint with the following scopes checked
-
In the mvc site, try clicking privacy or weather links logging in as a registered user.
-
Useful powershell script to generate secrets
$sec = ""
$cnt = 1
For ($i = 0; $i -le $cnt; $i++) {
$id = [guid]::NewGuid()
$sec += $id.ToString("D")
if ( $i + 1 -lt $cnt) {
$sec += "-"
}
}
$sec
- Try making the vb client call the weather api.
- Add to the mvc weather page ui and functionality to call the POST endpoint to the weather api and see if you can display the results.
- See what happens when you only allow read scope and try calling the POST endpoint. Try adding error handling or even ui updating to prevent the user from even trying
- In consent screen uncheck access to scopes and see what exceptions it causes. Figure out how to handle those situations
- Actually use refresh tokens when token has expired.
See AdminUI readme and skoruba/IdentityServer4.Admin for more info and setup.