Options
All
  • Public
  • Public/Protected
  • All
Menu

Module auth/spec

Variables

Const mockLoginAuthoriseRequiredResponse

mockLoginAuthoriseRequiredResponse: "<form id="application_authorization" action="/SASLogon/oauth/authorize" method="POST"><input type="hidden" name="X-Uaa-Csrf" value="2nfuxIn6WaOURWL7tzTXCe"/>" = `<form id="application_authorization" action="/SASLogon/oauth/authorize" method="POST"><input type="hidden" name="X-Uaa-Csrf" value="2nfuxIn6WaOURWL7tzTXCe"/>`

Const mockLoginSuccessResponse

mockLoginSuccessResponse: "You have signed in" = `You have signed in`

Functions

Const generateToken

  • generateToken(timeToLiveSeconds: number): string

Const mockedCurrentUserApi

  • mockedCurrentUserApi(username: string): object
  • Parameters

    • username: string

    Returns object

    • creationTimeStamp: string
    • id: string
    • links: object[]
    • modifiedTimeStamp: string
    • name: string
    • type: string
    • version: number

Object literals

Const mockAuthResponse

mockAuthResponse: object

access_token

access_token: string = "acc355"

expires_in

expires_in: number = new Date().valueOf()

id_token

id_token: string = "id"

jti

jti: string = "test"

refresh_token

refresh_token: string = "r3fr35h"

scope

scope: string = "default"

token_type

token_type: "bearer" = "bearer"

Generated using TypeDoc