Would you like to logout of IdentityServer?
11 | 19 |8 | Please enter the code displayed on your device 9 |
10 | 14 |Once complete, you may close this tab
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /01. Client Credentials Grant - ConsoleClient/Idp/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |Would you like to logout of IdentityServer?
11 | 19 |8 | Please enter the code displayed on your device 9 |
10 | 14 |Once complete, you may close this tab
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /02. Password Grant - WpfClient/Idp/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |Would you like to logout of IdentityServer?
11 | 19 |8 | Please enter the code displayed on your device 9 |
10 | 14 |Once complete, you may close this tab
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /03-04. Authorization Code Flow - MVC Client/Idp/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |@Model
10 |@ViewData["accessToken"]
8 | 9 |@ViewData["idToken"]
11 | 12 |@ViewData["refreshToken"]
14 | 15 |Would you like to logout of IdentityServer?
11 | 19 |8 | Please enter the code displayed on your device 9 |
10 | 14 |Once complete, you may close this tab
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /05. Implicit Flow - Angular Client Start/Idp/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |Would you like to logout of IdentityServer?
11 | 19 |8 | Please enter the code displayed on your device 9 |
10 | 14 |Once complete, you may close this tab
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /06. Implicit Flow - Angular Client Finish/Idp/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |2 | redirect-silent-renew works! 3 |
4 | -------------------------------------------------------------------------------- /06. Implicit Flow - Angular Client Finish/angular-client/src/app/oidc/redirect-silent-renew/redirect-silent-renew.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solenovex/Identity-Server-4-Tutorial-Demo-Code/786180f943be2b21aefcb886cc08535e19277b63/06. Implicit Flow - Angular Client Finish/angular-client/src/app/oidc/redirect-silent-renew/redirect-silent-renew.component.scss -------------------------------------------------------------------------------- /06. Implicit Flow - Angular Client Finish/angular-client/src/app/oidc/redirect-silent-renew/redirect-silent-renew.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { OpenIdConnectService } from '../open-id-connect.service'; 3 | 4 | @Component({ 5 | selector: 'ac-redirect-silent-renew', 6 | templateUrl: './redirect-silent-renew.component.html', 7 | styleUrls: ['./redirect-silent-renew.component.scss'] 8 | }) 9 | export class RedirectSilentRenewComponent implements OnInit { 10 | constructor(private oidc: OpenIdConnectService) {} 11 | 12 | ngOnInit() { 13 | this.oidc.handleSilentCallback(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /06. Implicit Flow - Angular Client Finish/angular-client/src/app/oidc/signin-oidc/signin-oidc.component.html: -------------------------------------------------------------------------------- 1 |2 | 登陆成功,返回ing 3 |
4 | -------------------------------------------------------------------------------- /06. Implicit Flow - Angular Client Finish/angular-client/src/app/oidc/signin-oidc/signin-oidc.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solenovex/Identity-Server-4-Tutorial-Demo-Code/786180f943be2b21aefcb886cc08535e19277b63/06. Implicit Flow - Angular Client Finish/angular-client/src/app/oidc/signin-oidc/signin-oidc.component.scss -------------------------------------------------------------------------------- /06. Implicit Flow - Angular Client Finish/angular-client/src/app/services/todo.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { TodoService } from './todo.service'; 4 | 5 | describe('TodoService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: TodoService = TestBed.get(TodoService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /06. Implicit Flow - Angular Client Finish/angular-client/src/app/services/todo.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Observable } from 'rxjs'; 4 | import { ITodo } from '../models/todo'; 5 | import { ITodoAdd } from '../models/todo-add'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class TodoService { 11 | constructor(private httpClient: HttpClient) {} 12 | 13 | getAllTodos(): Observable@Model
10 |Hello Identity Server 4 Demo
10 |@ViewData["accessToken"]
8 | 9 |@ViewData["idToken"]
11 | 12 |@ViewData["refreshToken"]
14 | 15 |Would you like to logout of IdentityServer?
11 | 19 |8 | Please enter the code displayed on your device 9 |
10 | 14 |Once complete, you may close this tab
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /07-08. Hybrid Flow - MVC Client/Idp/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |@Model
10 |Hello Identity Server 4 Demo
10 |@ViewData["accessToken"]
8 | 9 |@ViewData["idToken"]
11 | 12 |@ViewData["refreshToken"]
14 | 15 |Would you like to logout of IdentityServer?
11 | 19 |8 | Please enter the code displayed on your device 9 |
10 | 14 |Once complete, you may close this tab
5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/Idp/Views/Shared/_ValidationSummary.cshtml: -------------------------------------------------------------------------------- 1 | @if (ViewContext.ModelState.IsValid == false) 2 | { 3 |@ViewData["api1"]
3 |@ViewData["api2"]
-------------------------------------------------------------------------------- /09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/MvcClient/MvcClient/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 | @{ 4 | ViewData["Title"] = "Home Page"; 5 | } 6 | 7 |@Model
10 |@ViewData["accessToken"]
8 | 9 |@ViewData["idToken"]
11 | 12 |@ViewData["refreshToken"]
14 | 15 |2 | redirect-silent-renew works! 3 |
4 | -------------------------------------------------------------------------------- /09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/angular-client/src/app/oidc/redirect-silent-renew/redirect-silent-renew.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solenovex/Identity-Server-4-Tutorial-Demo-Code/786180f943be2b21aefcb886cc08535e19277b63/09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/angular-client/src/app/oidc/redirect-silent-renew/redirect-silent-renew.component.scss -------------------------------------------------------------------------------- /09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/angular-client/src/app/oidc/redirect-silent-renew/redirect-silent-renew.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { OpenIdConnectService } from '../open-id-connect.service'; 3 | 4 | @Component({ 5 | selector: 'ac-redirect-silent-renew', 6 | templateUrl: './redirect-silent-renew.component.html', 7 | styleUrls: ['./redirect-silent-renew.component.scss'] 8 | }) 9 | export class RedirectSilentRenewComponent implements OnInit { 10 | constructor(private oidc: OpenIdConnectService) {} 11 | 12 | ngOnInit() { 13 | this.oidc.handleSilentCallback(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/angular-client/src/app/oidc/signin-oidc/signin-oidc.component.html: -------------------------------------------------------------------------------- 1 |2 | 登陆成功,返回ing 3 |
4 | -------------------------------------------------------------------------------- /09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/angular-client/src/app/oidc/signin-oidc/signin-oidc.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solenovex/Identity-Server-4-Tutorial-Demo-Code/786180f943be2b21aefcb886cc08535e19277b63/09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/angular-client/src/app/oidc/signin-oidc/signin-oidc.component.scss -------------------------------------------------------------------------------- /09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/angular-client/src/app/services/todo.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { TodoService } from './todo.service'; 4 | 5 | describe('TodoService', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: TodoService = TestBed.get(TodoService); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /09. Single Sign On - MVC, Angular, Flask Clients access ASP.NET Core and express APIs/angular-client/src/app/services/todo.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { HttpClient } from '@angular/common/http'; 3 | import { Observable } from 'rxjs'; 4 | import { ITodo } from '../models/todo'; 5 | import { ITodoAdd } from '../models/todo-add'; 6 | 7 | @Injectable({ 8 | providedIn: 'root' 9 | }) 10 | export class TodoService { 11 | constructor(private httpClient: HttpClient) {} 12 | 13 | getAllTodos(): Observable