을 사용하여 IOS 클라이언트 용 Identity Server 3을 설치하는 방법 최근 Thinktecture의 Identity Server 3 및 특히 클라이언트와 플로우를 가지고 놀았습니다. 이제 IOS 응용 프로그램과 Identity Server 3인증 코드 흐름을 사용하여 통신이 어떻게 이루어지는 지보고 싶습니다.인증 코드 흐름
ASP.NET Mvc 클라이언트 (하이브리드 플로우)와 AngularJS 클라이언트 (암시 적 플로우)가 STS (Identity Server 3)를 사용하고 있습니다.
이new Client
{
ClientId = "implicitangularclient",
ClientName = "Angular client (Implicit)",
Flow = Flows.Implicit,
AllowAccessToAllScopes = true,
IdentityTokenLifetime = 10,
AccessTokenLifetime = 120,
// If we want to have SSO between Angular app and MVC app we need to have this option set to
// false for both the flows they implement(hybrid and implicit).
RequireConsent = false,
// redirect = URI of the Angular application
RedirectUris = new List<string>
{
"https://localhost:44555/callback.html",
// for silent refresh
"https://localhost:44555/silentrefreshframe.html"
},
PostLogoutRedirectUris = new List<string>()
{
"https://localhost:44555/index.html"
}
}
STS에 하이브리드 흐름 클라이언트 설치가 :
이 이자, 이제 내 목표는이다
new Client
{
ClientId = "hybridclient",
ClientName = "Mvc client (Hybrid)",
Flow = Flows.Hybrid,
AllowAccessToAllScopes = true,
// If we want to have SSO between Angular app and MVC app we need to have this option set to
// false for both the flows they implement(hybrid and implicit).
RequireConsent = false,
IdentityTokenLifetime = 10,
AccessTokenLifetime = 120,
// redirect = URI of the MVC application
RedirectUris = new List<string>
{
"https://localhost:44556"
},
// Needed when requesting refresh tokens
ClientSecrets = new List<Secret>()
{
new Secret("hybridflowsecret".Sha256())
},
PostLogoutRedirectUris = new List<string>()
{
"https://localhost:44556"
}
}
STS에
가
암시 적 흐름 클라이언트 설치 다음 STS 측면은 다음과 같습니다 인증 코드 흐름을 사용하여 기본 IOS 응용 프로그램 인 클라이언트를 설정합니다. 나는 현재 IOS 애플리케이션이 없지만, 나는 그런 클라이언트를위한 설정을 할 수 있었으면 좋겠다. 그래서 어느 날 IOS 애플리케이션이있다면, 나는 이미 정의한 클라이언트 ID와 클라이언트 이름 만주고 실행할 수있다. 나는 인터넷에서 예제를 찾으려고 노력했지만 성공하지 못해서 파고 들기 시작했다. 지금 내가 궁금해하는 것은 반환 URL이 무엇이어야하고 처리 된 클라이언트 쪽을 얻는 방법입니다. 이 사양 다음 : oauth2-native-apps-03, 시작은 section 5입니다. 사용자 정의 URI 체계, 앱 주장 HTTPS URI 체계 및 루프백 리디렉션 : 그것은
는 세 가지 기본 애플 리케이션을위한 URI를 리다이렉션 방법이 있다고 말한다. 일반적으로
지금까지 너무 좋아하지만, 지금까지 내가 이해, 클라이언트 측 응용 프로그램에 우리가 레지스터 정의 내가 전에 해본 적이 없다 URI 방식 (에 내가 해본 적이 필요 IOS 개발). 또한 특정 URL (대부분 ReturnUris url)이 승인 프로세스를 시작한 전화 브라우저로 전달 된 후에 앱을 열어야합니다. 나는 또한 Inter App communication for IOS에 약간의 시간을 보냈지 만 내 질문에 대한 답변을 얻지 못했습니다 : IOS 응용 프로그램과 설정에서 자신을 추상화하고 STS 만 구성하려면 어떻게 할 수 있습니까? STS 수준에서이 경우 Client 개체를 설정하는 조건은 무엇입니까? 리다이렉트 URI가 무엇이되어야 하는가? (내가 아는 한 그것은 역 DNS 표기법의 일종이다. com.mycompany.apples와 같은 것)? 그냥 STS 관리자와 실제 클라이언트가 내게 와서 말하길 상상해보십시오 : 이봐, 난이 ID와,이 비밀과 반환 URI를 IOS 응용 프로그램을 가지고 귀하의 STS에 나를 위해 그것을 설정하십시오.
모든 솔루션? –