of

fun of(value: String, type: ApiKey.SubjectType? = null): ApiKey(source)

Create an API key from the provided value, and optionally a known type.

Return

API key object.

Parameters

value

API key value to use.

type

Subject type for the key, if known. If unspecified, defaults to SubjectType.USER.

Throws

if the key fails to pass static checks.