Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • StormpathConstants

Index

Properties

Static AUTHENTICATION_ENDPOINT

AUTHENTICATION_ENDPOINT: string = "/login"

Default: /login

The URI that the login form will post to. The endpoint MUST accept data in the following format:

{
    username: '',
    password: ''
}

Static CHANGE_PASSWORD_ENDPOINT

CHANGE_PASSWORD_ENDPOINT: string = "/change"

Default: /change

The endpoint that is used to verify and consume password reset tokens (change a user's password with the token).

Static CURRENT_USER_URI

CURRENT_USER_URI: string = "/me"

Default: /me

The URI that is used to fetch the account object of the currently logged in user. This endpoint MUST:

  • Respond with a JSON object that is the Stormpath account object, if the user has an active session.
  • Respond with 401 Unauthorized if the user has no session.

Static DESTROY_SESSION_ENDPOINT

DESTROY_SESSION_ENDPOINT: string = "/logout"

Default: /logout

The URL that the logout action will make a GET request to, this endpoint MUST delete the access token cookie, XSRF token cookie, and any other cookies that relate to the user session.

Static EMAIL_VERIFICATION_ENDPOINT

EMAIL_VERIFICATION_ENDPOINT: string = "/verify"

Default: /verify

The endpoint that is used for verifying an account that requires email verification.

This endpoint MUST accept a POST request with the following format and use Stormpath to verify the token:

{
  sptoken: '<token from email sent to user>'
}

Static ENDPOINT_PREFIX

ENDPOINT_PREFIX: string = ""

Default: none

A prefix, e.g. "base URL" to add to all endpoints that are used by this SDK. Use this if your backend API is running on a different port or domain than your Angular application. Omit the trailing forward slash.

NOTE: This may trigger CORS behaviour in the browser, and your server will need to respond to requests accordingly. If you are using our Express SDK see allowedOrigins

Example:

  ENDPOINT_PREFIX = 'http://api.mydomain.com'

Static FORGOT_PASSWORD_ENDPOINT

FORGOT_PASSWORD_ENDPOINT: string = "/forgot"

Default: /forgot

The endpoint that is used by to create password reset tokens.

Static OAUTH_AUTHENTICATION_ENDPOINT

OAUTH_AUTHENTICATION_ENDPOINT: string = "/oauth/token"

Default: /oauth/token

The endpoint that is used to authenticate and refresh using OAuth tokens. This endpoint MUST support password and refresh_token grant authentication flows.

Static OAUTH_HEADERS

OAUTH_HEADERS: Headers = new Headers({'Content-Type': 'application/x-www-form-urlencoded','Accept': 'application/json'})

Static OAUTH_REVOKE_ENDPOINT

OAUTH_REVOKE_ENDPOINT: string = "/oauth/revoke"

Default: /oauth/revoke

The endpoint that is used to revoke OAuth tokens.

Static OAUTH_TOKEN_STORAGE_NAME

OAUTH_TOKEN_STORAGE_NAME: string = "stormpath:token"

Default: 'stormpath:token'

The name under which tokens are stored in the token storage mechanism. Might not be relevant if the underlying storage mechanism is not key-value based.

Static REGISTER_URI

REGISTER_URI: string = "/register"

Default: /register

The endpoint that is used to POST new users. This endpoint MUST accept a stormpath account object and use Stormpath to create the new user.

Static VERSION

VERSION: string = "${VERSION}"

Generated using TypeDoc