小编use*_*077的帖子

Spring安全性Oauth2资源所有者密码凭证授权

刚刚在我的eclipse IDE中安装了spring security oauth2.我试图实现的服务将由第二方用户通过其安装的应用程序使用,因此我选择使用密码授予类型.根据我对Oauth2的理解,以下请求应该适用于演示sparklr2服务,而无需我使用用户名和密码参数.即

POST http://localhost:8080/sparklr2/oauth/token?grant_type=password&client_id=my-trusted-client&scope=trust&username=marissa&password=koala
Run Code Online (Sandbox Code Playgroud)

但我一直在

<oauth>
<error_description>
Full authentication is required to access this resource
</error_description>
<error>unauthorized</error>
</oauth>
Run Code Online (Sandbox Code Playgroud)

我在这个请求中遗漏了什么,或者我需要在回购中启用一些东西

security passwords spring oauth

4
推荐指数
2
解决办法
8651
查看次数

如何在MaterialBetterSpinner库上实现onItemSelected

我在我的应用程序中实现了以下库微调器,即来自xml

<com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner
        android:id="@+id/insurer_code"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/hint_insurer_code"
        android:textColor="@color/smart_primary"
        android:textColorHint="@color/input_register_hint"
        app:met_floatingLabel="normal" />
Run Code Online (Sandbox Code Playgroud)

和java代码

public class testActivity extends Activity implements OnItemSelectedListener

@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {

    Toast.makeText(adapterView.getContext(), "Selected: " , Toast.LENGTH_LONG).show();
    // On selecting a spinner item
    String item = adapterView.getItemAtPosition(i).toString();
    // Showing selected spinner item
    Toast.makeText(adapterView.getContext(), "Selected: " + item, Toast.LENGTH_LONG).show();

}
Run Code Online (Sandbox Code Playgroud)

但是当从菜单中选择一个项目时,onItemSelected不会启动.有关如何成功实施上述图书馆的任何指导将不胜感激.

android spinner material

1
推荐指数
1
解决办法
4427
查看次数

标签 统计

android ×1

material ×1

oauth ×1

passwords ×1

security ×1

spinner ×1

spring ×1