Angular-Token
  • Introduction
  • Configuration
  • Session Management
  • Multiple User Types
  • Routing
  • Service Methods
  • Common Problems
  • Contribute
  • Migrate to Angular-Token 7.x
Powered by GitBook
On this page
  • .userSignedIn()
  • .currentUserType
  • .currentUserData
  • .currentAuthData
  • .tokenOptions

Was this helpful?

Service Methods

More advanced methods can be used if a higher degree of customisation is required.

.userSignedIn()

Returns true if a user is signed in. It does not distinguish between user types.

userSignedIn(): boolean

.currentUserType

Returns current user type as string like specified in the options.

get currentUserType(): string

.currentUserData

Returns current user data as returned by devise token auth. This variable is null after page reload until the .validateToken() call is answerd by the backend.

get currentUserData(): UserData

.currentAuthData

Returns current authentication data which are used to set auth headers.

get currentAuthData(): AuthData

.tokenOptions

Sets or returns the current Options.

get tokenOptions(): AngularTokenOptions

set tokenOptions(options: AngularTokenOptions)
PreviousRoutingNextCommon Problems

Last updated 6 years ago

Was this helpful?