'From Squeak6.0alpha of 29 September 2020 [latest update: #19885] on 12 October 2020 at 8:46:23 pm'!

!WebClient methodsFor: 'accessing' stamp: 'ct 10/12/2020 19:10'!
defaultPreAuthenticationMethod

	^ self token ifNil: [#basic] ifNotNil: [#bearer]! !

!WebClient methodsFor: 'accessing' stamp: 'ct 10/12/2020 19:25'!
preAuthenticationMethod
	"The authentication method to be used for initial requests. Symbol, e.g. #basic or #bearer. If nil, no authentication will be used until the server requests an authentication.
	
	NOTE: Some authentication mechanisms (NTLM/Negotiate) can use the credentials of the currently logged on user. Consequently, by default we only ask for credentials if we're unable to do so without asking."

	^ preAuthenticationMethod ifNil: [
		(self username notNil or: [self password notNil]) ifTrue: [
			self defaultPreAuthenticationMethod]]! !

