Skip to content

Commit

Permalink
_universalLogin
Browse files Browse the repository at this point in the history
  • Loading branch information
luisrudge committed Feb 1, 2018
1 parent c043c17 commit 30e95a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ <h2>Console:</h2>

$('.universal-login').click(function (e) {
e.preventDefault();
webAuth._hostedPages.login({
webAuth._universalLogin.login({
connection: 'acme',
username: $('.login-username').val(),
password: $('.login-password').val()
Expand Down
2 changes: 1 addition & 1 deletion src/web-auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function WebAuth(options) {
this.popup = new Popup(this, this.baseOptions);
this.crossOriginAuthentication = new CrossOriginAuthentication(this, this.baseOptions);
this.webMessageHandler = new WebMessageHandler(this);
this._hostedPages = new HostedPages(this, this.baseOptions);
this._universalLogin = new HostedPages(this, this.baseOptions);
}

/**
Expand Down
14 changes: 7 additions & 7 deletions test/web-auth/hosted-pages.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var RequestBuilder = require('../../src/helper/request-builder');

var telemetryInfo = new RequestBuilder({}).getTelemetryData();

describe('auth0.WebAuth._hostedPages', function() {
describe('auth0.WebAuth._universalLogin', function() {
beforeEach(function() {
stub(TransactionManager.prototype, 'process', function(params) {
return params;
Expand Down Expand Up @@ -55,7 +55,7 @@ describe('auth0.WebAuth._hostedPages', function() {
var auth0 = new WebAuth(configuration);

expect(function() {
auth0._hostedPages.login({
auth0._universalLogin.login({
connection: 'tests',
email: 'me@example.com',
password: '1234',
Expand Down Expand Up @@ -120,7 +120,7 @@ describe('auth0.WebAuth._hostedPages', function() {

var auth0 = new WebAuth(configuration);

auth0._hostedPages.login(
auth0._universalLogin.login(
{
connection: 'tests',
username: 'me@example.com',
Expand All @@ -145,7 +145,7 @@ describe('auth0.WebAuth._hostedPages', function() {
responseType: 'id_token'
});

auth0._hostedPages.login({
auth0._universalLogin.login({
connection: 'tests',
username: 'me@example.com',
password: '1234',
Expand Down Expand Up @@ -189,7 +189,7 @@ describe('auth0.WebAuth._hostedPages', function() {

var auth0 = new WebAuth(configuration);

auth0._hostedPages.login(
auth0._universalLogin.login(
{
connection: 'tests',
email: 'me@example.com',
Expand Down Expand Up @@ -300,7 +300,7 @@ describe('auth0.WebAuth._hostedPages', function() {
throw new Error('Invalid URL');
});

this.auth0._hostedPages.signupAndLogin(
this.auth0._universalLogin.signupAndLogin(
{
connection: 'the_connection',
email: 'me@example.com',
Expand Down Expand Up @@ -358,7 +358,7 @@ describe('auth0.WebAuth._hostedPages', function() {
});
});

this.auth0._hostedPages.signupAndLogin(
this.auth0._universalLogin.signupAndLogin(
{
connection: 'the_connection',
email: 'me@example.com',
Expand Down

0 comments on commit 30e95a2

Please sign in to comment.