Socket
Book a DemoInstallSign in
Socket

appirio-tech-ng-auth

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appirio-tech-ng-auth

[![GitHub version](https://badge.fury.io/gh/appirio-tech%2Fng-auth.svg)](http://badge.fury.io/gh/appirio-tech%2Fng-auth) [![Build Status](https://travis-ci.org/appirio-tech/ng-auth.svg)](https://travis-ci.org/appirio-tech/ng-auth) [![Coverage Status](http

4.2.6
latest
npmnpm
Version published
Weekly downloads
1
-50%
Maintainers
5
Weekly downloads
 
Created
Source

ng-auth

GitHub version Build Status Coverage Status Dependency Status

Install

bower install appirio-tech-ng-auth=git@github.com:appirio-tech/ng-auth --save

Usage

Include source

<script src="/bower_components/appirio-tech-ng-auth/dist/main.js" type="text/javascript"></script>

Add dependency

'use strict'

dependencies = [
  'appirio-tech-ng-auth'
]

angular.module 'app', dependencies

Login via a controller

controller = -> ($scope, AuthService)
  onSuccess = ->
    console.log 'log in successful'

  onError = ->
    console.log 'log in failed'

  $scope.login = ->
    loginOptions =
      username: $scope.username
      password: $scope.password
      error: onError
      success: onSuccess

    AuthService.login loginOptions

Check if user is logged in

isLoggedIn = AuthService.isLoggedIn

Get current user


controller = -> ($scope, UserV3Service)
  vm = this
  scope.$watch UserV3Service.getCurrentUser, ->
    user = UserV3Service.getCurrentUser()
    vm.user = user if user

FAQs

Package last updated on 28 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.