Subject does not have anypermission 报错是什么原因

你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
调用的接口是:创建聊天室接口。
返回的错误是:&{&error&:&unauthorized&,&timestamp&:8,&duration&:0,&exception&:&org.apache.shiro.authz.UnauthorizedException&,&error_description&:&Subject does not have permission [applications:post:1cef-11e5-a4d5-25f8d0905b00:/chatrooms]&}&
重新获取token,试试
这个问题请问解决了吗,我获取最新的token也解决不了
你用这个token,调用别的接口可以成功操作么
怎么解决的啊
重新获取一下token
好像不是token的问题
我换成了最新的token
我也出现这个问题了 有解决的了吗
还不可以么? 留一下QQ吧,帮你看下
要回复问题请先或
浏览: 1893
关注: 5 人
知识价值的认可,源自您的赞赏
扫描二维码,你的支付将由imGeek代收后转给对方
感谢您的赞赏
一个开放、互助、协作、创意的社区
一个开放、互助、协作、创意的社区
京ICP备号-324176人阅读
linux(14)
启动tomcat&
Cannot find bin/catalina.sh&
The file is absent or does not have execute permission&
This file is needed to run this program&
原因: 没有权限
解决 : chmod 777 *.sh&
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:280235次
积分:2653
积分:2653
排名:第11281名
原创:38篇
转载:65篇
评论:34条
(1)(1)(1)(1)(1)(1)(1)(2)(2)(4)(4)(1)(2)(1)(2)(1)(1)(6)(1)(6)(13)(7)(2)(6)(2)(7)(3)(1)(6)(13)(3)部署weblogic应用报User
does not have permission on weblogic.managem
部署weblogic应用报User
does not have permission on weblogic.managem
User &anonymous& does not have permission on weblogic.management.home to perform lookup operation
解决方案:
1、网上找到的解决方案是:
打开weblogic控制台,点击你部署工程的那个domain,在右边主页的下面有一个“View Domain-wide Security Settings”连接,点开它,看看复选框“Anonymous Admin Lookup Enabled”前面是没选的,把它勾上。
2、使用了1中的解决方案还是报这个错误,经过高手提醒后发现原因:
如果一个weblogic.xml中包含以下的内容:
&container-descriptor& &prefer-web-inf-classes&true&/prefer-web-inf-classes& &/container-descriptor&
这个配置的意思是使weblogic优先加载应用WEB-INF/lib下面的jar包。如果你在部署一个应用的时候,应用中weblogic.xml中已经包含这句,则
很有可能weblogic报异常,因为weblogic启动时已经加载了默认的jar,当扫描到这个weblogic.xml的时候,又被告知要先加载WEB-INF/lib下面的jar包。
这个时候weblogic就不知道怎么办了。遇到这样的问题,我们可以先将weblogic.xml中的这段配置剪切出来部署,当部署成功后,关闭weblogic服务器,
再将这段话粘贴回weblogic.xml就可以了,也就是说,应用至少要先部署成功才可以。
感谢关注 Ithao123精品文库频道,是专门为互联网人打造的学习交流平台,全面满足互联网人工作与学习需求,更多互联网资讯尽在 IThao123!
Laravel是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)。它可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。
Hadoop是一个由Apache基金会所开发的分布式系统基础架构。
用户可以在不了解分布式底层细节的情况下,开发分布式程序。充分利用集群的威力进行高速运算和存储。
Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量(high throughput)来访问应用程序的数据,适合那些有着超大数据集(large data set)的应用程序。HDFS放宽了(relax)POSIX的要求,可以以流的形式访问(streaming access)文件系统中的数据。
Hadoop的框架最核心的设计就是:HDFS和MapReduce。HDFS为海量的数据提供了存储,则MapReduce为海量的数据提供了计算。
产品设计是互联网产品经理的核心能力,一个好的产品经理一定在产品设计方面有扎实的功底,本专题将从互联网产品设计的几个方面谈谈产品设计
随着国内互联网的发展,产品经理岗位需求大幅增加,在国内,从事产品工作的大部分岗位为产品经理,其实现实中,很多从事产品工作的岗位是不能称为产品经理,主要原因是对产品经理的职责不明确,那产品经理的职责有哪些,本专题将详细介绍产品经理的主要职责
IThao123周刊Subject (Java Platform SE 7 )
JavaScript is disabled on your browser.
Class Subject
javax.security.auth.Subject
All Implemented Interfaces:
public final class Subject
implements
A Subject represents a grouping of related information
for a single entity, such as a person.
Such information includes the Subject's identities as well as
its security-related attributes
(passwords and cryptographic keys, for example).
Subjects may potentially have multiple identities.
Each identity is represented as a Principal
within the Subject.
Principals simply bind names to a
For example, a Subject that happens
to be a person, Alice, might have two Principals:
one which binds "Alice Bar", the name on her driver license,
to the Subject, and another which binds,
"999-99-9999", the number on her student identification card,
to the Subject.
Both Principals refer to the same
Subject even though each has a different name.
A Subject may also own security-related attributes,
which are referred to as credentials.
Sensitive credentials that require special protection, such as
private cryptographic keys, are stored within a private credential
Credentials intended to be shared, such as
public key certificates or Kerberos server tickets are stored
within a public credential Set.
Different permissions
are required to access and modify the different credential Sets.
To retrieve all the Principals associated with a Subject,
invoke the getPrincipals method.
To retrieve
all the public or private credentials belonging to a Subject,
invoke the getPublicCredentials method or
getPrivateCredentials method, respectively.
To modify the returned Set of Principals and credentials,
use the methods defined in the Set class.
For example:
// add a Principal and credential to the Subject
subject.getPrincipals().add(principal);
subject.getPublicCredentials().add(credential);
This Subject class implements Serializable.
While the Principals associated with the Subject are serialized,
the credentials associated with the Subject are not.
Note that the java.security.Principal class
does not implement Serializable.
Therefore all concrete
Principal implementations associated with Subjects
must implement Serializable.
See Also:,
Constructor Summary
Constructors&
Constructor and Description
Create an instance of a Subject
with an empty Set of Principals and empty
Sets of public and private credentials.
(boolean&readOnly,
&? extends &&principals,
&?&&pubCredentials,
&?&&privCredentials)
Create an instance of a Subject with
Principals and credentials.
Method Summary
Modifier and Type
Method and Description
static &T&&T
(&subject,
&T&&action)
Perform work as a particular Subject.
static &T&&T
(&subject,
&T&&action)
Perform work as a particular Subject.
static &T&&T
(&subject,
&T&&action,
Perform privileged work as a particular Subject.
static &T&&T
(&subject,
&T&&action,
Perform privileged work as a particular Subject.
Compares the specified Object with this Subject
for equality.
Return the Set of Principals associated with this
&T extends &&&T&
Return a Set of Principals associated with this
Subject that are instances or subclasses of the specified
Return the Set of private credentials held by this
Return a Set of private credentials associated with this
Subject that are instances or subclasses of the specified
Return the Set of public credentials held by this
Return a Set of public credentials associated with this
Subject that are instances or subclasses of the specified
Get the Subject associated with the provided
AccessControlContext.
Returns a hashcode for this Subject.
Query whether this Subject is read-only.
Set this Subject to be read-only.
Return the String representation of this Subject.
Methods inherited from class&java.lang.
, , , , , , ,
Constructor Detail
public&Subject()
Create an instance of a Subject
with an empty Set of Principals and empty
Sets of public and private credentials.
The newly constructed Sets check whether this Subject
has been set read-only before permitting subsequent modifications.
The newly created Sets also prevent illegal modifications
by ensuring that callers have sufficient permissions.
To modify the Principals Set, the caller must have
AuthPermission("modifyPrincipals").
To modify the public credential Set, the caller must have
AuthPermission("modifyPublicCredentials").
To modify the private credential Set, the caller must have
AuthPermission("modifyPrivateCredentials").
public&Subject(boolean&readOnly,
&? extends &&principals,
&?&&pubCredentials,
&?&&privCredentials)
Create an instance of a Subject with
Principals and credentials.
The Principals and credentials from the specified Sets
are copied into newly constructed Sets.
These newly created Sets check whether this Subject
has been set read-only before permitting subsequent modifications.
The newly created Sets also prevent illegal modifications
by ensuring that callers have sufficient permissions.
To modify the Principals Set, the caller must have
AuthPermission("modifyPrincipals").
To modify the public credential Set, the caller must have
AuthPermission("modifyPublicCredentials").
To modify the private credential Set, the caller must have
AuthPermission("modifyPrivateCredentials").
Parameters:readOnly - true if the Subject is to be read-only,
and false otherwise. principals - the Set of Principals
to be associated with this Subject. pubCredentials - the Set of public credentials
to be associated with this Subject. privCredentials - the Set of private credentials
to be associated with this Subject.
- if the specified
principals, pubCredentials,
or privCredentials are null.
Method Detail
setReadOnly
public&void&setReadOnly()
Set this Subject to be read-only.
Modifications (additions and removals) to this Subject's
Principal Set and
credential Sets will be disallowed.
The destroy operation on this Subject's credentials will
still be permitted.
Subsequent attempts to modify the Subject's Principal
and credential Sets will result in an
IllegalStateException being thrown.
Also, once a Subject is read-only,
it can not be reset to being writable again.
- if the caller does not have permission
to set this Subject to be read-only.
isReadOnly
public&boolean&isReadOnly()
Query whether this Subject is read-only.
Returns:true if this Subject is read-only, false otherwise.
getSubject
public static&&getSubject(&acc)
Get the Subject associated with the provided
AccessControlContext.
The AccessControlContext may contain many
Subjects (from nested doAs calls).
In this situation, the most recent Subject associated
with the AccessControlContext is returned.
Parameters:acc - the AccessControlContext from which to retrieve
the Subject.
Returns:the Subject associated with the provided
AccessControlContext, or null
if no Subject is associated
with the provided AccessControlContext.
- if the caller does not have permission
to get the Subject.
- if the provided
AccessControlContext is null.
public static&&T&&T&doAs(&subject,
&T&&action)
Perform work as a particular Subject.
This method first retrieves the current Thread's
AccessControlContext via
AccessController.getContext,
and then instantiates a new AccessControlContext
using the retrieved context along with a new
SubjectDomainCombiner (constructed using
the provided Subject).
Finally, this method invokes AccessController.doPrivileged,
passing it the provided PrivilegedAction,
as well as the newly constructed AccessControlContext.
Parameters:subject - the Subject that the specified
action will run as.
This parameter
may be null. action - the code to be run as the specified
Returns:the value returned by the PrivilegedAction's
run method.
- if the PrivilegedAction
- if the caller does not have permission
to invoke this method.
public static&&T&&T&doAs(&subject,
&T&&action)
Perform work as a particular Subject.
This method first retrieves the current Thread's
AccessControlContext via
AccessController.getContext,
and then instantiates a new AccessControlContext
using the retrieved context along with a new
SubjectDomainCombiner (constructed using
the provided Subject).
Finally, this method invokes AccessController.doPrivileged,
passing it the provided PrivilegedExceptionAction,
as well as the newly constructed AccessControlContext.
Parameters:subject - the Subject that the specified
action will run as.
This parameter
may be null. action - the code to be run as the specified
Returns:the value returned by the
PrivilegedExceptionAction's run method.
PrivilegedExceptionAction.run
method throws a checked exception.
- if the specified
PrivilegedExceptionAction is
- if the caller does not have permission
to invoke this method.
doAsPrivileged
public static&&T&&T&doAsPrivileged(&subject,
&T&&action,
Perform privileged work as a particular Subject.
This method behaves exactly as Subject.doAs,
except that instead of retrieving the current Thread's
AccessControlContext, it uses the provided
AccessControlContext.
If the provided
AccessControlContext is null,
this method instantiates a new AccessControlContext
with an empty collection of ProtectionDomains.
Parameters:subject - the Subject that the specified
action will run as.
This parameter
may be null. action - the code to be run as the specified
Subject. acc - the AccessControlContext to be tied to the
specified subject and action.
Returns:the value returned by the PrivilegedAction's
run method.
- if the PrivilegedAction
- if the caller does not have permission
to invoke this method.
doAsPrivileged
public static&&T&&T&doAsPrivileged(&subject,
&T&&action,
Perform privileged work as a particular Subject.
This method behaves exactly as Subject.doAs,
except that instead of retrieving the current Thread's
AccessControlContext, it uses the provided
AccessControlContext.
If the provided
AccessControlContext is null,
this method instantiates a new AccessControlContext
with an empty collection of ProtectionDomains.
Parameters:subject - the Subject that the specified
action will run as.
This parameter
may be null. action - the code to be run as the specified
Subject. acc - the AccessControlContext to be tied to the
specified subject and action.
Returns:the value returned by the
PrivilegedExceptionAction's run method.
PrivilegedExceptionAction.run
method throws a checked exception.
- if the specified
PrivilegedExceptionAction is
- if the caller does not have permission
to invoke this method.
getPrincipals
public&&&&getPrincipals()
Return the Set of Principals associated with this
Each Principal represents
an identity for this Subject.
The returned Set is backed by this Subject's
internal Principal Set.
Any modification
to the returned Set affects the internal
Principal Set as well.
Returns:The Set of Principals associated with this
getPrincipals
public&&T extends &&&T&&getPrincipals(&T&&c)
Return a Set of Principals associated with this
Subject that are instances or subclasses of the specified
The returned Set is not backed by this Subject's
internal Principal Set.
Set is created and returned for each method invocation.
Modifications to the returned Set
will not affect the internal Principal Set.
Parameters:c - the returned Set of Principals will all be
instances of this class.
Returns:a Set of Principals that are instances of the
specified Class.
- if the specified Class
getPublicCredentials
public&&&&getPublicCredentials()
Return the Set of public credentials held by this
The returned Set is backed by this Subject's
internal public Credential Set.
Any modification
to the returned Set affects the internal public
Credential Set as well.
Returns:A Set of public credentials held by this
getPrivateCredentials
public&&&&getPrivateCredentials()
Return the Set of private credentials held by this
The returned Set is backed by this Subject's
internal private Credential Set.
Any modification
to the returned Set affects the internal private
Credential Set as well.
A caller requires permissions to access the Credentials
in the returned Set, or to modify the
Set itself.
A SecurityException
is thrown if the caller does not have the proper permissions.
While iterating through the Set,
a SecurityException is thrown
if the caller does not have permission to access a
particular Credential.
The Iterator
is nevertheless advanced to next element in the Set.
Returns:A Set of private credentials held by this
getPublicCredentials
public&&T&&&T&&getPublicCredentials(&T&&c)
Return a Set of public credentials associated with this
Subject that are instances or subclasses of the specified
The returned Set is not backed by this Subject's
internal public Credential Set.
Set is created and returned for each method invocation.
Modifications to the returned Set
will not affect the internal public Credential Set.
Parameters:c - the returned Set of public credentials will all be
instances of this class.
Returns:a Set of public credentials that are instances
specified Class.
- if the specified Class
getPrivateCredentials
public&&T&&&T&&getPrivateCredentials(&T&&c)
Return a Set of private credentials associated with this
Subject that are instances or subclasses of the specified
The caller must have permission to access all of the
requested Credentials, or a SecurityException
will be thrown.
The returned Set is not backed by this Subject's
internal private Credential Set.
Set is created and returned for each method invocation.
Modifications to the returned Set
will not affect the internal private Credential Set.
Parameters:c - the returned Set of private credentials will all be
instances of this class.
Returns:a Set of private credentials that are instances
specified Class.
- if the specified Class
public&boolean&equals(&o)
Compares the specified Object with this Subject
for equality.
Returns true if the given object is also a Subject
and the two Subject instances are equivalent.
More formally, two Subject instances are
equal if their Principal and Credential
Sets are equal.
Overrides:
&in class&
Parameters:o - Object to be compared for equality with this
Returns:true if the specified Object is equal to this
- if the caller does not have permission
to access the private credentials for this Subject,
or if the caller does not have permission to access the
private credentials for the provided Subject.See Also:,
public&&toString()
Return the String representation of this Subject.
Overrides:
&in class&
Returns:the String representation of this Subject.
public&int&hashCode()
Returns a hashcode for this Subject.
Overrides:
&in class&
Returns:a hashcode for this Subject.
- if the caller does not have permission
to access this Subject's private credentials.See Also:,
For further API reference and developer documentation, see . That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
© , Oracle and/or its affiliates.
All rights reserved. Use is subject to . Also see the .
Scripting on this page tracks web page traffic, but does not change the content in any way.

我要回帖

更多关于 does he have 的文章

 

随机推荐