net~ UserAuthTokenUrlHelperMixin

A mixin class that adds security token support to a SolarUser module:net~UrlHelper.

Methods

deleteAuthTokenUrl(tokenId) → {string}

Generate a URL for deleting an auth token, via a DELETE request.

Parameters:
NameTypeDescription
tokenIdstring

the token ID to delete

Returns:

the URL

Type: 
string

generateAuthTokenUrl(type) → {string}

Generate a URL for creating a new auth token, via a POST request.

The request body accepts a module:domain~SecurityPolicy JSON document.

Parameters:
NameTypeDescription
typeAuthTokenType

the auth token type to generate

Returns:

the URL

Type: 
string

listAllAuthTokensUrl() → {string}

Generate a URL for listing all available auth tokens.

Returns:

the URL

Type: 
string

replaceAuthTokenSecurityPolicyUrl(tokenId) → {string}

Generate a URL for replacing a security policy on an auth token, via a PUT request.

The request body accepts a module:domain~SecurityPolicy JSON document.

Parameters:
NameTypeDescription
tokenIdstring

the ID of the token to update

Returns:

the URL

Type: 
string

updateAuthTokenSecurityPolicyUrl(tokenId) → {string}

Generate a URL for updating (merging) a security policy on an auth token, via a PATCH request.

The request body accepts a module:net~SecurityPolicy JSON document.

Parameters:
NameTypeDescription
tokenIdstring

the ID of the token to update

Returns:

the URL

Type: 
string

updateAuthTokenStatusUrl(tokenId, status) → {string}

Generate a URL for updating the status of an auth token, via a POST request.

Parameters:
NameTypeDescription
tokenIdstring

the ID of the token to update

statusAuthTokenStatus

the status to change to

Returns:

the URL

Type: 
string