mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
NSURLProtectionSpace: improve authentication method handling
Improve handling of NSURL authentication methods. Make "HTMLForm" authentication a no-op as it should be instead of making it fall back to Basic authentication. Add stubs for NTLM and Negotiate IIS methods. They should be easily implementable given the current framework for authentication methods. Add stubs for ClientCertificate and ServerTrust authentication methods. A blocker for supporting them is the lack of a Security.framework implementation (since they rely on SecTrustRef). They would also require additions to the current SSL handling code for GNUstep https requests. Also stub the -distinguishedNames property of NSURLProtectionSpace, which also deals with certificate-related authentication methods.
This commit is contained in:
parent
aa70ff5300
commit
814c19ecce
3 changed files with 91 additions and 3 deletions
|
@ -41,7 +41,7 @@ extern NSString * const NSURLProtectionSpaceHTTPProxy; /** An HTTP proxy */
|
|||
extern NSString * const NSURLProtectionSpaceHTTPSProxy; /** An HTTPS proxy */
|
||||
extern NSString * const NSURLProtectionSpaceSOCKSProxy; /** A SOCKS proxy */
|
||||
|
||||
/** Default authentication */
|
||||
/** Default authentication (Basic) */
|
||||
extern NSString * const NSURLAuthenticationMethodDefault;
|
||||
|
||||
/** HTML form authentication */
|
||||
|
@ -53,6 +53,15 @@ extern NSString * const NSURLAuthenticationMethodHTTPBasic;
|
|||
/** HTTP Digest authentication */
|
||||
extern NSString * const NSURLAuthenticationMethodHTTPDigest;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
extern NSString * const NSURLAuthenticationMethodNTLM;
|
||||
extern NSString * const NSURLAuthenticationMethodNegotiate;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
extern NSString * const NSURLAuthenticationMethodClientCertificate;
|
||||
extern NSString * const NSURLAuthenticationMethodServerTrust;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Class to encapsulate a protection space ... where authentication is
|
||||
|
@ -129,6 +138,14 @@ authenticationMethod: (NSString *)authenticationMethod;
|
|||
*/
|
||||
- (BOOL) receivesCredentialSecurely;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) && GS_API_VERSION( 11300,GS_API_LATEST)
|
||||
#if GS_HAS_DECLARED_PROPERTIES
|
||||
@property (readonly, copy) NSArray *distinguishedNames;
|
||||
#else
|
||||
- (NSArray *) distinguishedNames;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue