src/main/java/com/authlete/jaxrs/AuthorizationDecisionHandler.java
private Response authorize(
            String ticket, String subject, long authTime, String acr,
            Map<String, Object> claims, Property[] properties, String[] scopes)
    {
        try
        {
            // Generate a redirect response containing an authorization code,
            // an access token and/or an ID token. If the original authorization
            // request had response_type=none, no tokens will be contained in
            // the generated response, though.
            return getApiCaller().authorizationIssue(
                    ticket, subject, authTime, acr, claims, properties, scopes);
        }
        catch (WebApplicationException e)
        {
            return e.getResponse();
        }
    }
private Response authorize(
            String ticket, String subject, long authTime, String acr,
            Map<String, Object> claims, Property[] properties, String[] scopes)
    {
        try
        {
            // Generate a redirect response containing an authorization code,
            // an access token and/or an ID token. If the original authorization
            // request had response_type=none, no tokens will be contained in
            // the generated response, though.
            return getApiCaller().authorizationIssue(
                    ticket, subject, authTime, acr, claims, properties, scopes);
        }
        catch (WebApplicationException e)
        {
            return e.getResponse();
        }
    }
Handle an end-user's decision of granting authorization to the client
application. This method calls Authlete's {@code
/api/auth/authorization/issue} API.

<p>
<b>Note about the {@code claims} argument:</b>
</p>

<p>
A response from Authlete's {@code /api/auth/authorization} API contains
{@code claims} parameter which is a {@code String} array of claim names
such as {@code name}, {@code email} and {@code birthdate}. They are
claims requested by the client application. You are expected to collect
values of the claims and pass the collected claim key-value pairs to
Authlete's {@code /api/auth/authorization/issue} API. The {@code claims}
argument of this method is the collected claim key-value pairs.
</p>

<p>
Types of claim values vary depending on claim keys. Types of most
standard claims (see "<a href=
"http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims"
>5.1. Standard Claims</a>" in <a href=
"http://openid.net/specs/openid-connect-core-1_0.html">OpenID Connect
Core 1.0</a>) are string, but types of {@code email_verified} claim
and {@code phone_number_verified} claim are boolean and the type of
{@code updated_at} claim is number. In addition, the type of {@code
address} claim is JSON object. The detailed format of {@code address}
claim is described in <a href=
"http://openid.net/specs/openid-connect-core-1_0.html#AddressClaim"
>5.1.1. Address Claim</a>. {@link com.authlete.common.dto.Address
Address} class in <a href="https://github.com/authlete/authlete-java-common"
>authlete-java-common</a> library can be used to represent a value of
{@code address} claim.
</p>

<p>
The following code is an example to prepare {@code claims} argument.
</p>

<blockquote>
<pre style="border: 1px solid gray; padding: 0.5em; margin: 1em;">
Map&lt;String, Object&gt; claims = new HashMap&lt;String, Object&gt;();

<span style="color: green;">// Name</span>
claims.put(<span style="color: darkred;">"name"</span>,        <span style="color: darkred;">"Takahiko Kawasaki"</span>);
claims.put(<span style="color: darkred;">"given_name"</span>,  <span style="color: darkred;">"Takahiko"</span>);
claims.put(<span style="color: darkred;">"family_name"</span>, <span style="color: darkred;">"Kawasaki"</span>);

<span style="color: green;">// Name with a language tag.
// See <a href="http://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts"
>5.2. Claims Languages and Scripts</a> for details.</span>
claims.put(<span style="color: darkred;">"name#ja"</span>,        <span style="color: darkred;"
>"\u5DDD\u5D0E \u8CB4\u5F66"</span>);  <span style="color: green;">// &#x5ddd;&#x5D0E; &#x8CB4;&#x5F66;</span>
claims.put(<span style="color: darkred;">"given_name#ja"</span>,  <span style="color: darkred;"
>"\u8CB4\u5F66"</span>);               <span style="color: green;">// &#x8CB4;&#x5F66;</span>
claims.put(<span style="color: darkred;">"family_name#ja"</span>, <span style="color: darkred;"
>"\u5DDD\u5D0E"</span>);               <span style="color: green;">// &#x5ddd;&#x5D0E;</span>

<span style="color: green;">// Postal address.
// See <a href="http://openid.net/specs/openid-connect-core-1_0.html#AddressClaim"
>5.1.1. Address Claim</a> for details.</span>
Address address = new Address()
.setCountry(<span style="color: darkred;">"JP"</span>)
.setRegion(<span style="color: darkred;">"Tokyo"</span>)
.setLocality(<span style="color: darkred;">"Itabashi-ku"</span>)
.setFormatted(<span style="color: darkred;">"Itabashi-ku, Tokyo, Japan"</span>);
claims.put(<span style="color: darkred;">"address"</span>, address);

<span style="color: green;">// Other information.</span>
claims.put(<span style="color: darkred;">"gender"</span>,    <span style="color: darkred;">"male"</span>);
claims.put(<span style="color: darkred;">"birthdate"</span>, <span style="color: darkred;">"1974-05-06"</span>);
claims.put(<span style="color: darkred;">"zoneinfo"</span>,  <span style="color: darkred;">"Asia/Tokyo"</span>);
claims.put(<span style="color: darkred;">"locale"</span>,    <span style="color: darkred;">"ja"</span>);

<span style="color: green;">// FYI: Constant values in {@link com.authlete.common.types.StandardClaims
StandardClaims} class can be used as keys.</span></pre>
</blockquote>

@param ticket
A ticket that was issued by Authlete's {@code /api/auth/authorization} API.

@param subject
The subject (= unique identifier) of the end-user.

@param authTime
The time when end-user authentication occurred. The number of
seconds since Unix epoch (1970-01-01). This value is used as
the value of {@code auth_time} claim in an ID token that may
be issued. Pass 0 if the time is unknown.

@param acr
The authentication context class reference that the end-user
authentication satisfied. This value is used as the value of
{@code acr} claim in an ID token that may be issued. Pass
{@code null} if ACR is unknown.

@param claims
Pairs of claim key and claim value. The pairs are embedded
in an ID token that may be issued. Passing {@code null} means
that values of the requested claims are not available.

@param properties
Extra properties to associate with an access token and/or
an authorization code.

@param scopes
Scopes to associate with an access token and/or an authorization
code. If {@code null} is given, the scopes contained in the
original authorization request are used. Otherwise, including
the case of an empty array, the scopes given to this method
replace the scopes. Note that <code>"openid"</code> scope is
ignored if it is not included in the original authorization
request.

@return
A response that should be returned to the client application.