Mixin: UserAuthTokenUrlHelperMixin

net~ UserAuthTokenUrlHelperMixin

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

Methods


deleteAuthTokenUrl(tokenId)

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

Parameters:
Name Type Description
tokenId string

the token ID to delete

Returns:

the URL

Type
string

generateAuthTokenUrl(type)

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

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

Parameters:
Name Type Description
type AuthTokenType

the auth token type to generate

Returns:

the URL

Type
string

listAllAuthTokensUrl()

Generate a URL for listing all available auth tokens.

Returns:

the URL

Type
string

replaceAuthTokenSecurityPolicyUrl(tokenId)

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:
Name Type Description
tokenId string

the ID of the token to update

Returns:

the URL

Type
string

updateAuthTokenSecurityPolicyUrl(tokenId)

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:
Name Type Description
tokenId string

the ID of the token to update

Returns:

the URL

Type
string

updateAuthTokenStatusUrl(tokenId, status)

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

Parameters:
Name Type Description
tokenId string

the ID of the token to update

status AuthTokenStatus

the status to change to

Returns:

the URL

Type
string