![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
암호화폐 뉴스 기사
.NET 애플리케이션 용 ARCGIS MAPS MAPS MAPS MAPS FOR .NET 애플리케이션을 새로운 인증 시스템으로 마무리합니다.
2025/03/11 01:15
2024 년에 .NET 팀의 ArcGIS Maps SDK는 단순화를위한 장기적인 노력의 일환으로 인증 API에 대한 상당한 변경 사항을 도입했습니다.
In 2024, the ArcGIS Maps SDK for .NET team introduced significant changes to authentication APIs as part of a long-term effort to simplify and align the .NET Maps SDK with other Native Maps SDKs. This transition also involved deprecating older APIs to streamline development and maintain compatibility with the broader ArcGIS Platform.
2024 년에 .NET 팀의 ArcGIS Maps SDK는 .NET 맵 SDK를 다른 기본 맵 SDK와 단순화하고 정렬하려는 장기적인 노력의 일환으로 인증 API에 대한 상당한 변경 사항을 도입했습니다. 이 전환은 또한 구형 API를 사용하지 않고 개발을 간소화하고 더 넓은 ArcGIS 플랫폼과의 호환성을 유지하는 것도 포함되었습니다.
This blog post will guide you through this transition, highlighting new capabilities, outlining clear paths from deprecated APIs, and providing practical code examples to help you implement these changes quickly and confidently.
이 블로그 게시물은 이러한 전환을 안내하여 새로운 기능을 강조하고, 더 이상 API의 명확한 경로를 요약하고, 이러한 변경 사항을 빠르고 자신있게 구현하는 데 도움이되는 실용적인 코드 예제를 제공합니다.
New Credential Types
새로운 자격 증명 유형
Let’s start by exploring the new credential types that form the foundation of the updated authentication system.
업데이트 된 인증 시스템의 기초를 형성하는 새로운 자격 증명 유형을 탐색하는 것으로 시작하겠습니다.
OAuthUserCredential (200.6+)
OauthuserCredential (200.6+)
This replaces OAuthTokenCredentials of type OAuthAuthorizationCode.
이것은 Oauthtokencendentials 유형 OAuthauthorizationCode를 대체합니다.
OAuthUserCredential implements user authentication using OAuth “authorization code” flow with PKCE. This is the recommended approach for authenticating end users, providing extra security compared to other methods.
OauthuserCredential은 PKCE를 사용한 OAUTH "Authorization Code"흐름을 사용하여 사용자 인증을 구현합니다. 이것은 최종 사용자를 인증하기위한 권장되는 접근법이며 다른 방법에 비해 추가 보안을 제공합니다.
When a user signs in to your application with their ArcGIS account, a token is generated that authorizes your app to access services and content on behalf of the user. The available resources and functionality depend on the user’s ArcGIS account type, roles, and privileges.
사용자가 ArcGIS 계정으로 애플리케이션에 서명하면 앱이 사용자를 대신하여 서비스 및 컨텐츠에 액세스 할 수있는 토큰이 생성됩니다. 사용 가능한 리소스 및 기능은 사용자의 ArcGIS 계정 유형, 역할 및 권한에 따라 다릅니다.
To implement this authentication flow, you need to:
이 인증 흐름을 구현하려면 다음을 수행해야합니다.
Our Access services with OAuth credentials tutorial provides a complete implementation example.
OAUTH Credentials Tutorial을 사용한 Access Services는 완전한 구현 예를 제공합니다.
OAuthAppCredential (200.5+)
Oauthappredential (200.5+)
This replaces OAuthTokenCredentials of type OAuthClientCredentials.
이것은 Oauthtokencendentials 유형 OauthclientCredentials를 대체합니다.
OAuthApplicationCredential implements app authentication using OAuth “client credentials” flow. Use this to create applications that do not require users to sign in, but still need access to token-secured resources and services.
OAuthApplicationCredential은 OAUTH "클라이언트 자격 증명"흐름을 사용하여 앱 인증을 구현합니다. 이를 사용하여 사용자가 로그인 할 필요가 없지만 여전히 토큰 보안 리소스 및 서비스에 액세스 해야하는 응용 프로그램을 만듭니다.
With this approach, requests are made using the credits and privileges associated with your app’s account rather than an individual user’s account. An app credential is created from a client ID and client secret that have been pre-registered with the portal.
이 접근법을 사용하면 개별 사용자의 계정이 아닌 앱 계정과 관련된 크레딧 및 권한을 사용하여 요청이 이루어집니다. 앱 자격 증명은 포털에 사전 등록 된 클라이언트 ID 및 클라이언트 비밀에서 생성됩니다.
The client secret should be treated as confidential information since it allows direct billing to your developer account. This authentication method is intended for secure environments where credentials cannot be easily exposed to end users. Never include your client secret in publicly distributed applications.
클라이언트 비밀은 개발자 계정에 직접 청구 할 수 있으므로 기밀 정보로 취급되어야합니다. 이 인증 방법은 자격 증명을 최종 사용자에게 쉽게 노출 할 수없는 안전한 환경을위한 것입니다. 공개적으로 분산 된 응용 프로그램에 클라이언트 비밀을 포함시키지 마십시오.
AccessTokenCredential (200.6+)
AccessTokenCendential (200.6+)
This replaces ArcGISTokenCredentials created by GenerateCredentialAsync.
이것은 generatecredentialasync에 의해 생성 된 arcgistokencendentials를 대체합니다.
AccessTokenCredential provides an access token for secured ArcGIS content and services. You can obtain this token in several ways:
AccessTokenCendential은 안전한 ArcGIS 컨텐츠 및 서비스를위한 액세스 토큰을 제공합니다. 여러 가지 방법 으로이 토큰을 얻을 수 있습니다.
Our ArcGIS token challenge sample shows how to create this credential in response to an authentication challenge. You can also create and add a credential to the AuthenticationManager before accessing secured services.
ArcGIS 토큰 챌린지 샘플은 인증 문제에 대한 응답 으로이 자격 증명을 만드는 방법을 보여줍니다. 보안 서비스에 액세스하기 전에 AuthenticationManager에 자격 증명을 생성하고 추가 할 수도 있습니다.
PregeneratedTokenCredential (200.5+)
사전 GeneratedTokenCendential (200.5+)
This replaces ArcGISTokenCredentials created by the token-string constructor.
이것은 토큰-스트링 생성자에 의해 생성 된 arcgistokencendentials를 대체합니다.
PregeneratedTokenCredential accesses token-secured ArcGIS content and services using an independently generated token. This credential type gives you flexibility when integrating with custom authentication systems. Use it when you:
사전 GeneratedTokencencendentual은 독립적으로 생성 된 토큰을 사용하여 토큰 안전한 ArcGIS 컨텐츠 및 서비스에 액세스합니다. 이 자격 증명 유형은 사용자 정의 인증 시스템과 통합 할 때 유연성을 제공합니다. 당신이 할 때 그것을 사용하십시오 :
New Supporting APIs
새로운 지원 API
Beyond the credential types themselves, several supporting APIs have been added to enhance flexibility and control.
자격 증명 유형 자체 외에도 유연성과 제어를 향상시키기 위해 여러 지원 API가 추가되었습니다.
Server Certificate Validation (200.6+)
서버 인증서 유효성 검증 (200.6+)
When working with HTTPS services, you can now customize how SSL/TLS certificates are validated. Specify a custom callback when configuring HTTP settings to examine all SSL connections made by the Maps SDK.
HTTPS 서비스를 사용하는 경우 이제 SSL/TLS 인증서가 검증되는 방법을 사용자 정의 할 수 있습니다. HTTP 설정을 구성 할 때 MAPS SDK에서 작성한 모든 SSL 연결을 검사 할 때 사용자 정의 콜백을 지정하십시오.
Server certificates are usually validated by the operating system using default policies and known Certificate Authorities, but your own validator can accept or reject connections based on custom criteria. For example:
서버 인증서는 일반적으로 기본 정책 및 알려진 인증 기관을 사용하여 운영 체제에서 검증되지만 자체 유효성 검사기는 사용자 지정 기준에 따라 연결을 수락하거나 거부 할 수 있습니다. 예를 들어:
The callback uses the standard .NET RemoteCertificateValidationCallback signature. For more information including code examples, see Microsoft’s guide to custom X509Certificate validation.
콜백은 표준 .NET RemoteCertificateValidationCallback 서명을 사용합니다. 코드 예제를 포함한 자세한 내용은 Custom x509Certificate 유효성 검사에 대한 Microsoft 안내서를 참조하십시오.
IHttpMessageInterceptor (200.5+)
ihttpmessageinterceptor (200.5+)
The new IHttpMessageInterceptor interface allows you to monitor, modify, or even mock HTTP requests and responses. This powerful capability can be configured globally when configuring HTTP settings on startup. Common use cases include:
새로운 ihttpmessageinterceptor 인터페이스를 사용하면 HTTP 요청 및 응답을 모니터, 수정 또는 조롱 할 수 있습니다. 이 강력한 기능은 시작시 HTTP 설정을 구성 할 때 전 세계적으로 구성 할 수 있습니다. 일반적인 사용 사례는 다음과 같습니다.
Logging and Diagnostics: Log request and response details for monitoring and debugging:
로깅 및 진단 : 모니터링 및 디버깅을위한 로그 요청 및 응답 세부 사항 :
import logging
가져 오기 로깅
logger = logging.getLogger(__name__)
logger = logging.getLogger (__ name__)
class MessageInterceptor(IHttpMessageInterceptor):
클래스 MessageInterceptor (ihttpmessageinterceptor) :
"""Logs request and response details to the console."""
"" "로그 요청 및 콘솔에 대한 응답 세부 사항." ""
def OnRequest(self, request, cancellationToken):
def onrequest (self, request, cancellationtoken) :
"""Called before a request is sent."""
"" "요청이 전송되기 전에 호출됩니다." ""
logger.info(f"Request: {request.Method} {request.RequestUri}")
logger.info (f "요청 : {request.method} {request.requesturi}")
for header in request.Headers:
request.headers의 헤더의 경우 :
logger.info(f" Header: {header}")
logger.info (f "헤더 : {헤더}")
async def main():
Async def main () :
"""Main function to configure and run the message interceptor."""
"" "메시지 인터셉터를 구성하고 실행하는 메인 기능." ""
message_interceptor = MessageInterceptor()
message_interceptor = messageinterceptor ()
http_settings = HttpSettings.Builder().AddMessageInterceptor(message_interceptor).Build()
http_settings = httpsettings.builder (). addmessageinterceptor (message_interceptor) .build ()
async with AuthenticationManager.CreateInstanceAsync(credentials, http_settings) as auth_manager:
auth_manager로 AuthenticationManager.createInstanceAsync (자격 증명, http_settings)가있는 Async :
user = await ArcGISUser.CurrentUserAsync(auth_manager)
user = await arcgisuser.currentuserasync (auth_manager)
logger.info(f"Logged in as: {user.Username}")
logger.info (f "로그인 : {user.username}")
if __name__ == "__main__":
__name__ == "__main__"인 경우 :
logging.basicConfig(level=logging.INFO, format='%(asctime
logging.basicconfig (level = logging.info, format = '%(asctime
부인 성명:info@kdj.com
제공된 정보는 거래 조언이 아닙니다. kdj.com은 이 기사에 제공된 정보를 기반으로 이루어진 투자에 대해 어떠한 책임도 지지 않습니다. 암호화폐는 변동성이 매우 높으므로 철저한 조사 후 신중하게 투자하는 것이 좋습니다!
본 웹사이트에 사용된 내용이 귀하의 저작권을 침해한다고 판단되는 경우, 즉시 당사(info@kdj.com)로 연락주시면 즉시 삭제하도록 하겠습니다.