Class AuthIssueTokenParams
-
- All Implemented Interfaces:
-
com.courier.core.Params
public final class AuthIssueTokenParams implements Params
Returns a new access token.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classAuthIssueTokenParams.BuilderA builder for AuthIssueTokenParams.
public final classAuthIssueTokenParams.Body
-
Method Summary
Modifier and Type Method Description final StringexpiresIn()Duration for token expiration. final Stringscope()Available scopes: user_id:<user-id>- Defines which user the token will be scoped to. Multiple can be listed if needed. Exuser_id:pigeon user_id:bluebird.read:messages- Read messages.read:user-tokens- Read user push tokens.write:user-tokens- Write user push tokens.read:brands[:<brand_id>]- Read brands, optionally restricted to a specific brand_id. Examplesread:brands,read:brands:my_brand.write:brands[:<brand_id>]- Write brands, optionally restricted to a specific brand_id. Exampleswrite:brands,write:brands:my_brand.inbox:read:messages- Read inbox messages.inbox:write:events- Write inbox events, such as mark message as read.read:preferences- Read user preferences.write:preferences- Write user preferences. Example:user_id:user123 write:user-tokens inbox:read:messages inbox:write:events read:preferences write:preferences read:brands
final JsonField<String>_expiresIn()Returns the raw JSON value of expiresIn. final JsonField<String>_scope()Returns the raw JSON value of scope. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final AuthIssueTokenParams.BuildertoBuilder()final AuthIssueTokenParams.Body_body()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static AuthIssueTokenParams.Builderbuilder()Returns a mutable builder for constructing an instance of AuthIssueTokenParams. -
-
Method Detail
-
expiresIn
final String expiresIn()
Duration for token expiration. Accepts various time formats:
"2 hours" - 2 hours from now
"1d" - 1 day
"3 days" - 3 days
"10h" - 10 hours
"2.5 hrs" - 2.5 hours
"1m" - 1 minute
"5s" - 5 seconds
"1y" - 1 year
-
scope
final String scope()
Available scopes:
user_id:<user-id>- Defines which user the token will be scoped to. Multiple can be listed if needed. Exuser_id:pigeon user_id:bluebird.read:messages- Read messages.read:user-tokens- Read user push tokens.write:user-tokens- Write user push tokens.read:brands[:<brand_id>]- Read brands, optionally restricted to a specific brand_id. Examplesread:brands,read:brands:my_brand.write:brands[:<brand_id>]- Write brands, optionally restricted to a specific brand_id. Exampleswrite:brands,write:brands:my_brand.inbox:read:messages- Read inbox messages.inbox:write:events- Write inbox events, such as mark message as read.read:preferences- Read user preferences.write:preferences- Write user preferences. Example:user_id:user123 write:user-tokens inbox:read:messages inbox:write:events read:preferences write:preferences read:brands
-
_expiresIn
final JsonField<String> _expiresIn()
Returns the raw JSON value of expiresIn.
Unlike expiresIn, this method doesn't throw if the JSON field has an unexpected type.
-
_scope
final JsonField<String> _scope()
Returns the raw JSON value of scope.
Unlike scope, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final AuthIssueTokenParams.Builder toBuilder()
-
_body
final AuthIssueTokenParams.Body _body()
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
builder
final static AuthIssueTokenParams.Builder builder()
Returns a mutable builder for constructing an instance of AuthIssueTokenParams.
The following fields are required:
.expiresIn() .scope()
-
-
-