 
         callback null, url
 
+      validateOAuth: (options, callback) ->
+        callback ERROR.VALIDATION
+
 
     # -- FACEBOOK PROVIDER ------------------------------------------------8<--
 

bongo       = require 'bongo'
{ secure, signature } = bongo
crypto      = require 'crypto'
oauth       = require 'oauth'
parser      = require 'url'
KodingError = require '../error'


module.exports = class OAuth extends bongo.Base


          callback null, url

      validateOAuth: (options, callback) ->

        { url, applicationId, applicationSecret } = options

        MissingFieldError = 'Missing field for validating oauth'

        if not url then return callback new KodingError \
          MissingFieldError, 'MissingField', { fields: ['url'] }
        if not applicationId then return callback new KodingError \
          MissingFieldError, 'MissingField', { fields: ['applicationId'] }
        if not applicationSecret then return callback new KodingError \
          MissingFieldError, 'MissingField', { fields: ['applicationSecret'] }

        isAddressValid url, (err) ->

          if err
            err.error = { fields: ['url'] }
            return callback err

    # -- GITHUB PROVIDER --------------------------------------------------8<--

