public class AuthenticationSpecificationImpl extends Object implements AuthenticationSpecification, groovy.lang.GroovyObject
| Constructor and Description |
|---|
AuthenticationSpecificationImpl(RequestSpecification requestSpecification) |
| Modifier and Type | Method and Description |
|---|---|
RequestSpecification |
basic(String userName,
String password)
Use http basic authentication.
|
RequestSpecification |
certificate(String certURL,
String password)
Sets a certificate to be used for SSL authentication.
|
RequestSpecification |
certificate(String certURL,
String password,
CertificateAuthSettings settings)
Sets a certificate to be used for SSL authentication.
|
RequestSpecification |
digest(String userName,
String password)
Use http digest authentication.
|
RequestSpecification |
form(String userName,
String password)
Use form authentication.
|
RequestSpecification |
form(String userName,
String password,
FormAuthConfig config)
Use form authentication with the supplied configuration.
|
groovy.lang.MetaClass |
getMetaClass() |
RequestSpecification |
none()
Explicitly state that you don't which to use any authentication in this request.
|
RequestSpecification |
ntlm(String userName,
String password,
String workstation,
String domain)
Use NTLM authentication.
|
RequestSpecification |
oauth(String consumerKey,
String consumerSecret,
String accessToken,
String secretToken)
Excerpt from the HttpBuilder docs:
OAuth sign the request. |
RequestSpecification |
oauth(String consumerKey,
String consumerSecret,
String accessToken,
String secretToken,
OAuthSignature signature)
Excerpt from the HttpBuilder docs:
OAuth sign the request. |
RequestSpecification |
oauth2(String accessToken)
OAuth2 sign the request.
|
RequestSpecification |
oauth2(String accessToken,
OAuthSignature signature)
OAuth2 sign the request.
|
PreemptiveAuthSpec |
preemptive()
Returns the preemptive authentication view.
|
void |
setMetaClass(groovy.lang.MetaClass mc) |
public AuthenticationSpecificationImpl(RequestSpecification requestSpecification)
public RequestSpecification basic(String userName, String password)
AuthenticationSpecificationbasic in interface AuthenticationSpecificationuserName - The user name.password - The password.public RequestSpecification ntlm(String userName, String password, String workstation, String domain)
AuthenticationSpecificationntlm in interface AuthenticationSpecificationuserName - The user name.password - The password.public RequestSpecification digest(String userName, String password)
AuthenticationSpecificationdigest in interface AuthenticationSpecificationuserName - The user name.password - The password.public RequestSpecification certificate(String certURL, String password)
AuthenticationSpecificationClass.getResource(String)
for how to get a URL from a resource on the classpath.
Uses keystore: KeyStore.getDefaultType().
Uses port: 443
Uses keystore provider: none
certificate in interface AuthenticationSpecificationcertURL - URL to a JKS keystore where the certificate is stored.password - password to decrypt the keystorepublic RequestSpecification certificate(String certURL, String password, CertificateAuthSettings settings)
AuthenticationSpecificationClass.getResource(String) for how to get a URL from a resource
on the classpath.
certificate in interface AuthenticationSpecificationcertURL - URL to a JKS keystore where the certificate is stored.password - The password for the keystoresettings - More advanced settings for the certificate authenticationpublic RequestSpecification oauth(String consumerKey, String consumerSecret, String accessToken, String secretToken)
AuthenticationSpecificationoauth in interface AuthenticationSpecificationpublic RequestSpecification oauth(String consumerKey, String consumerSecret, String accessToken, String secretToken, OAuthSignature signature)
AuthenticationSpecificationoauth in interface AuthenticationSpecificationpublic RequestSpecification oauth2(String accessToken)
AuthenticationSpecificationoauth2 in interface AuthenticationSpecificationaccessToken - The access tokenpublic RequestSpecification oauth2(String accessToken, OAuthSignature signature)
AuthenticationSpecificationoauth2 in interface AuthenticationSpecificationaccessToken - The access tokensignature - The signature (note that if using OAuthSignature.QUERY_STRING then Scribe must be added to the classpath)public RequestSpecification none()
AuthenticationSpecificationnone in interface AuthenticationSpecificationpublic PreemptiveAuthSpec preemptive()
AuthenticationSpecificationpreemptive in interface AuthenticationSpecificationpublic RequestSpecification form(String userName, String password)
AuthenticationSpecificationform in interface AuthenticationSpecificationuserName - The user name.password - The password.public RequestSpecification form(String userName, String password, FormAuthConfig config)
AuthenticationSpecificationform in interface AuthenticationSpecificationuserName - The user name.password - The password.config - The form authentication configpublic groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectpublic void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass in interface groovy.lang.GroovyObjectCopyright © 2010–2022. All rights reserved.