# Module auth/spec

### Variables

- mockLoginAuthoriseRequiredResponse
- mockLoginSuccessResponse

### Functions

- generateToken
- mockedCurrentUserApi

### Object literals

- mockAuthResponse
- mockSasjsAuthResponse

## 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"/>`

- Defined in src/auth/spec/mockResponses.ts:3

### Const mockLoginSuccessResponse

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

- Defined in src/auth/spec/mockResponses.ts:4

## Functions

### Const generateToken

- generateToken(timeToLiveSeconds: number): string

- - Defined in src/auth/spec/mockResponses.ts:21

  #### Parameters

  - ##### timeToLiveSeconds: number

  #### Returns string

### Const mockedCurrentUserApi

- mockedCurrentUserApi(username: string): object

- - Defined in src/auth/spec/mockResponses.ts:31

  #### 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

- Defined in src/auth/spec/mockResponses.ts:6

### access_token

access_token: string = "acc355"

- Defined in src/auth/spec/mockResponses.ts:7

### expires_in

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

- Defined in src/auth/spec/mockResponses.ts:11

### id_token

id_token: string = "id"

- Defined in src/auth/spec/mockResponses.ts:9

### jti

jti: string = "test"

- Defined in src/auth/spec/mockResponses.ts:13

### refresh_token

refresh_token: string = "r3fr35h"

- Defined in src/auth/spec/mockResponses.ts:8

### scope

scope: string = "default"

- Defined in src/auth/spec/mockResponses.ts:12

### token_type

token_type: "bearer" = "bearer"

- Defined in src/auth/spec/mockResponses.ts:10

### Const mockSasjsAuthResponse

mockSasjsAuthResponse: object

- Defined in src/auth/spec/mockResponses.ts:16

### access_token

access_token: string = "acc355"

- Defined in src/auth/spec/mockResponses.ts:17

### refresh_token

refresh_token: string = "r3fr35h"

- Defined in src/auth/spec/mockResponses.ts:18

Generated using TypeDoc