<commit_before>package com.jayway.restassured.specification

import com.jayway.restassured.authentication.BasicAuthScheme
import com.jayway.restassured.authentication.CertAuthScheme
import com.jayway.restassured.authentication.OAuthScheme
import com.jayway.restassured.internal.RequestSpecificationImpl

class AuthenticationSpecification {
  private RequestSpecificationImpl requestBuilder;

  AuthenticationSpecification(RequestSpecificationImpl requestBuilder) {
    this.requestBuilder = requestBuilder
  }

  def RequestSpecificationImpl basic(String userName, String password) {
    requestBuilder.authenticationScheme = new BasicAuthScheme(userName: userName, password: password)
    return requestBuilder
  }

  def RequestSpecificationImpl certificate(String certURL, String password) {
    requestBuilder.authenticationScheme = new CertAuthScheme(certURL: certURL, password: password)
    return requestBuilder
  }

  def RequestSpecificationImpl oauth(String consumerKey, String consumerSecret, String accessToken, String secretToken) {
    requestBuilder.authenticationScheme = new OAuthScheme(consumerKey: consumerKey, consumerSecret: consumerSecret, accessToken: accessToken, secretToken: secretToken)<commit_msg>Fixed authentication spec<commit_after>package com.jayway.restassured.specification

import com.jayway.restassured.authentication.BasicAuthScheme
import com.jayway.restassured.authentication.CertAuthScheme
import com.jayway.restassured.authentication.OAuthScheme
import com.jayway.restassured.internal.RequestSpecificationImpl

class AuthenticationSpecification {
  private RequestSpecification requestBuilder;

  AuthenticationSpecification(RequestSpecification requestBuilder) {
    this.requestBuilder = requestBuilder
  }

  def RequestSpecification basic(String userName, String password) {
    requestBuilder.authenticationScheme = new BasicAuthScheme(userName: userName, password: password)
    return requestBuilder
  }

  def RequestSpecification certificate(String certURL, String password) {
    requestBuilder.authenticationScheme = new CertAuthScheme(certURL: certURL, password: password)
    return requestBuilder
  }

  def RequestSpecification oauth(String consumerKey, String consumerSecret, String accessToken, String secretToken) {
    requestBuilder.authenticationScheme = new OAuthScheme(consumerKey: consumerKey, consumerSecret: consumerSecret, accessToken: accessToken, secretToken: secretToken)
{'fraction_non_alphanumeric': 0.05810147299509002, 'fraction_numerical': 0.0, 'mean_word_length': 7.232323232323233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3115573', 'n_tokens_mistral': 612, 'n_tokens_neox': 588, 'n_words': 135}