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 |
certificate(String certURL,
String password,
String keystoreType,
int port)
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() |
Object |
getProperty(String property) |
Object |
invokeMethod(String method,
Object arguments) |
RequestSpecification |
none()
Explicitly state that you don't which to use any authentication in this request.
|
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)
Excerpt from the HttpBuilder docs:
OAuth sign the request. |
RequestSpecification |
oauth2(String accessToken,
OAuthSignature signature)
Excerpt from the HttpBuilder docs:
OAuth sign the request. |
PreemptiveAuthSpec |
preemptive()
Returns the preemptive authentication view.
|
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setProperty(String property,
Object value) |
public AuthenticationSpecificationImpl(RequestSpecification requestSpecification)
public groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectpublic void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass in interface groovy.lang.GroovyObjectpublic Object invokeMethod(String method, Object arguments)
invokeMethod in interface groovy.lang.GroovyObjectpublic Object getProperty(String property)
getProperty in interface groovy.lang.GroovyObjectpublic void setProperty(String property, Object value)
setProperty in interface groovy.lang.GroovyObjectpublic RequestSpecification basic(String userName, String password)
AuthenticationSpecificationbasic 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 certificate(String certURL, String password, String keystoreType, int port)
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 - password to decrypt the keystorekeystoreType - The keystore typeport - The SSL portpublic 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 AuthenticationSpecificationpublic 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 configCopyright © 2010–2014. All rights reserved.