Correct spelling of method 'getPrincipal' newly introduced in AuthScheme interface
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1695237 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2e080356cd
commit
fcaa920b93
|
@ -170,7 +170,7 @@ public class WindowsNegotiateScheme implements AuthScheme {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Principal getPrinciple() {
|
||||
public Principal getPrincipal() {
|
||||
return new BasicUserPrincipal(getCurrentUsername());
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ public class TestWindowsNegotiateScheme extends LocalServerTestBase {
|
|||
Assume.assumeTrue("Test can only be run on Windows", WinHttpClients.isWinAuthAvailable());
|
||||
|
||||
// HTTPCLIENT-1545
|
||||
// If a service principle name (SPN) from outside your Windows domain tree (e.g., HTTP/example.com) is used,
|
||||
// If a service principal name (SPN) from outside your Windows domain tree (e.g., HTTP/example.com) is used,
|
||||
// InitializeSecurityContext will return SEC_E_DOWNGRADE_DETECTED (decimal: -2146892976, hex: 0x80090350).
|
||||
// Because WindowsNegotiateScheme wasn't setting the completed state correctly when authentication fails,
|
||||
// HttpClient goes into an infinite loop, constantly retrying the negotiate authentication to kingdom
|
||||
|
|
|
@ -41,7 +41,7 @@ import org.apache.http.protocol.HttpContext;
|
|||
* Care must be taken when re-using connections authorized through a connection based
|
||||
* authentication scheme and they may carry a particular security context and be authorized
|
||||
* for a particular user identity. It is important that such schemes always provide
|
||||
* the user identity they represent through the {@link #getPrinciple()} method.
|
||||
* the user identity they represent through the {@link #getPrincipal()} method.
|
||||
* <p>
|
||||
* Authentication scheme are expected to transition through a series of standard phases or
|
||||
* states.
|
||||
|
@ -162,13 +162,13 @@ public interface AuthScheme {
|
|||
* an authentication response. Connection based schemes are required
|
||||
* to return a user {@link Principal} if authorization applies to
|
||||
* for the entire life span of connection.
|
||||
* @return user principle
|
||||
* @return user principal
|
||||
*
|
||||
* @see #isConnectionBased()
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
Principal getPrinciple();
|
||||
Principal getPrincipal();
|
||||
|
||||
/**
|
||||
* Generates an authorization response based on the current state. Some authentication
|
||||
|
|
|
@ -154,7 +154,7 @@ public class BasicScheme implements AuthScheme, Serializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Principal getPrinciple() {
|
||||
public Principal getPrincipal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ public class DigestScheme implements AuthScheme, Serializable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Principal getPrinciple() {
|
||||
public Principal getPrincipal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ public abstract class GGSSchemeBase implements AuthScheme {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Principal getPrinciple() {
|
||||
public Principal getPrincipal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ public class NTLMScheme implements AuthScheme {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Principal getPrinciple() {
|
||||
public Principal getPrincipal() {
|
||||
return this.credentials != null ? this.credentials.getUserPrincipal() : null;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ import org.apache.http.protocol.HttpContext;
|
|||
* persistent connections created with a particular user identity within
|
||||
* a particular security context can be reused by the same user only.
|
||||
* <p>
|
||||
* DefaultUserTokenHandler will use the user principle of connection
|
||||
* DefaultUserTokenHandler will use the user principal of connection
|
||||
* based authentication schemes such as NTLM or that of the SSL session
|
||||
* with the client authentication turned on. If both are unavailable,
|
||||
* {@code null} token will be returned.
|
||||
|
@ -91,7 +91,7 @@ public class DefaultUserTokenHandler implements UserTokenHandler {
|
|||
private static Principal getAuthPrincipal(final AuthExchange authState) {
|
||||
final AuthScheme scheme = authState.getAuthScheme();
|
||||
if (scheme != null && scheme.isConnectionBased()) {
|
||||
return scheme.getPrinciple();
|
||||
return scheme.getPrincipal();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue