<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 19:08:47 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[AAA-157] Unable to create OAuth2 token for new user</title>
                <link>https://jira.opendaylight.org/browse/AAA-157</link>
                <project id="10102" key="AAA">aaa</project>
                    <description>&lt;p&gt;While following tutorial on &lt;a href=&quot;http://docs.opendaylight.org/en/latest/user-guide/authentication-and-authorization-services.html?highlight=aaa%7C#configuration-using-the-restful-web-service&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.opendaylight.org/en/latest/user-guide/authentication-and-authorization-services.html?highlight=aaa%7C#configuration-using-the-restful-web-service&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&apos;ve run into some issues&lt;/p&gt;

&lt;p&gt;Steps&lt;/p&gt;

&lt;p&gt;1 . Create OAuth token for user admin&lt;/p&gt;

&lt;p&gt;curl -X POST \&lt;br/&gt;
 &lt;a href=&quot;http://localhost:8181/oauth2/token&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/oauth2/token&lt;/a&gt; \&lt;br/&gt;
 -H &apos;Cache-Control: no-cache&apos; \&lt;br/&gt;
 -H &apos;Content-Type: application/x-www-form-urlencoded&apos; \&lt;br/&gt;
 -d &apos;grant_type=password&amp;amp;username=admin&amp;amp;password=admin&amp;amp;scope=sdn&apos;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Response 201&lt;/b&gt;&lt;/p&gt;

{ &quot;access_token&quot;: &quot;*TOKEN*&quot;, &quot;token_type&quot;: &quot;Bearer&quot;, &quot;expires_in&quot;: 3600 }

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;2.&#160;Create user domain&lt;/p&gt;

&lt;p&gt;curl -X POST \&lt;br/&gt;
 &lt;a href=&quot;http://localhost:8181/auth/v1/domains&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/auth/v1/domains&lt;/a&gt; \&lt;br/&gt;
 -H &apos;Authorization: Bearer &lt;b&gt;TOKEN&lt;/b&gt;&apos; \&lt;br/&gt;
 -H &apos;Cache-Control: no-cache&apos; \&lt;br/&gt;
 -H &apos;Content-Type: application/json&apos; \&lt;br/&gt;
 -d &apos;&lt;/p&gt;

{ &quot;name&quot;:&quot;XY&quot;, &quot;description&quot;:&quot;XY domain&quot;, &quot;enabled&quot;:true }

&lt;p&gt;&apos;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Response 201&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;3.Create test user&lt;/p&gt;

&lt;p&gt;curl -X POST \&lt;br/&gt;
 &lt;a href=&quot;http://localhost:8181/auth/v1/users&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/auth/v1/users&lt;/a&gt; \&lt;br/&gt;
 -H &apos;Authorization: Basic YWRtaW46YWRtaW4=&apos; \&lt;br/&gt;
 -H &apos;Cache-Control: no-cache&apos; \&lt;br/&gt;
 -H &apos;Content-Type: application/json&apos; \&lt;br/&gt;
 -d &apos;&lt;/p&gt;

{ &quot;name&quot;: &quot;test_user&quot;, &quot;password&quot;: &quot;12345&quot;, &quot;domainid&quot;: &quot;XY&quot;, &quot;description&quot;: &quot;Test user account&quot;, &quot;email&quot;: &quot;test_user@xy.tech&quot; }

&lt;p&gt;&apos;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Response 201&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;4. Create OAuth2 token for this user&lt;/p&gt;

&lt;p&gt;curl -X POST \&lt;br/&gt;
 &lt;a href=&quot;http://localhost:8181/oauth2/token&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/oauth2/token&lt;/a&gt; \&lt;br/&gt;
 -H &apos;Cache-Control: no-cache&apos; \&lt;br/&gt;
 -H &apos;Content-Type: application/x-www-form-urlencoded&apos; \&lt;br/&gt;
 -d &apos;grant_type=password&amp;amp;username=test_user&amp;amp;password=12345&amp;amp;scope=xy&apos;&lt;/p&gt;

&lt;p&gt;Response 500&lt;/p&gt;

{&quot;error_description&quot;:&quot;The Claim is missing one or more of the required fields.&quot;,&quot;error&quot;:&quot;java.lang.IllegalStateException&quot;}

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="29114">AAA-157</key>
            <summary>Unable to create OAuth2 token for new user</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="1" iconUrl="https://jira.opendaylight.org/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="gvrangan">Venkatrangan Govindarajan</assignee>
                                    <reporter username="jsrnicek_cisco">Jan Srnicek</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Jan 2018 13:16:34 +0000</created>
                <updated>Mon, 23 Sep 2019 18:24:44 +0000</updated>
                                            <version>Nitrogen-SR1</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="60991" author="rgoulding" created="Thu, 8 Feb 2018 15:11:57 +0000"  >&lt;p&gt;just change the content-type to application/json and should work.&#160; It isn&apos;t right, but this code was not contributed by me.&#160; I can take a look at a later time...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10001">
                    <name>Cloners</name>
                                            <outwardlinks description="clones">
                                        <issuelink>
            <issuekey id="22326">AAA-75</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i039rj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>