{"size": 1068, "ext": "js", "max_stars_repo_path": "src/foam/nanos/auth/twofactor/OTPAuthService.js", "max_stars_repo_name": "TW80000/foam2", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/foam/nanos/auth/twofactor/OTPAuthService.js", "max_issues_repo_name": "TW80000/foam2", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/foam/nanos/auth/twofactor/OTPAuthService.js", "max_forks_repo_name": "TW80000/foam2", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.5384615385, "max_line_length": 61, "alphanum_fraction": 0.4953183521}
/**
 * @license
 * Copyright 2018 The FOAM Authors. All Rights Reserved.
 * http://www.apache.org/licenses/LICENSE-2.0
 */

foam.INTERFACE({
  package: 'foam.nanos.auth.twofactor',
  name: 'OTPAuthService',

  documentation: 'One-time password auth service',

  methods: [
    {
      name: 'generateKey',
      returns: 'Promise',
      javaReturns: 'String',
      swiftReturns: 'String',
      javaThrows: [ 'javax.naming.AuthenticationException' ],
      args: [
        {
          name: 'x',
          javaType: 'foam.core.X',
          swiftType: 'Context'
        },
        {
          name: 'generateQrCode',
          javaType: 'boolean',
          swiftType: 'Bool'
        }
      ]
    },
    {
      name: 'verifyToken',
      returns: 'Promise',
      javaReturns: 'boolean',
      swiftReturns: 'Bool',
      args: [
        {
          name: 'x',
          javaType: 'foam.core.X',
          swiftType: 'Context'
        },
        {
          name: 'token',
          javaType: 'String',
          swiftType: 'String'
        }
      ]
    }
  ]
});