当前位置: 首页>>代码示例>>Java>>正文


Java StatusCodes.Bad_IdentityTokenInvalid方法代码示例

本文整理汇总了Java中com.digitalpetri.opcua.stack.core.StatusCodes.Bad_IdentityTokenInvalid方法的典型用法代码示例。如果您正苦于以下问题:Java StatusCodes.Bad_IdentityTokenInvalid方法的具体用法?Java StatusCodes.Bad_IdentityTokenInvalid怎么用?Java StatusCodes.Bad_IdentityTokenInvalid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.digitalpetri.opcua.stack.core.StatusCodes的用法示例。


在下文中一共展示了StatusCodes.Bad_IdentityTokenInvalid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validatePolicyId

import com.digitalpetri.opcua.stack.core.StatusCodes; //导入方法依赖的package包/类
private UserTokenPolicy validatePolicyId(Object tokenObject) throws UaException {
    if (tokenObject instanceof UserIdentityToken) {
        UserIdentityToken token = (UserIdentityToken) tokenObject;
        String policyId = token.getPolicyId();

        for (UserTokenPolicy policy : server.getUserTokenPolicies()) {
            if (policyId.equals(policy.getPolicyId())) {
                return policy;
            }
        }

        throw new UaException(StatusCodes.Bad_IdentityTokenInvalid, "policy not found: " + policyId);
    } else {
        throw new UaException(StatusCodes.Bad_IdentityTokenInvalid);
    }
}
 
开发者ID:digitalpetri,项目名称:ua-server-sdk,代码行数:17,代码来源:SessionManager.java

示例2: validateAnonymousToken

import com.digitalpetri.opcua.stack.core.StatusCodes; //导入方法依赖的package包/类
/**
 * Validate an {@link AnonymousIdentityToken} and return an identity Object that represents the user.
 * <p>
 * This Object should implement equality in such a way that a subsequent identity validation for the same user
 * yields a comparable Object.
 *
 * @param token       the {@link AnonymousIdentityToken}.
 * @param tokenPolicy the {@link UserTokenPolicy} specified by the policyId in {@code token}.
 * @param channel     the {@link SecureChannel} the request is arriving on.
 * @param session     the {@link Session} the request is arriving on.
 * @return an identity Object that represents the user.
 * @throws UaException if the token is invalid, rejected, or user access is denied.
 */
public Object validateAnonymousToken(AnonymousIdentityToken token, UserTokenPolicy tokenPolicy,
                                     SecureChannel channel, Session session) throws UaException {
    throw new UaException(StatusCodes.Bad_IdentityTokenInvalid);
}
 
开发者ID:digitalpetri,项目名称:ua-server-sdk,代码行数:18,代码来源:IdentityValidator.java

示例3: validateUsernameToken

import com.digitalpetri.opcua.stack.core.StatusCodes; //导入方法依赖的package包/类
/**
 * Validate a {@link UserNameIdentityToken} and return an identity Object that represents the user.
 * <p>
 * This Object should implement equality in such a way that a subsequent identity validation for the same user
 * yields a comparable Object.
 *
 * @param token       the {@link UserNameIdentityToken}.
 * @param tokenPolicy the {@link UserTokenPolicy} specified by the policyId in {@code token}.
 * @param channel     the {@link SecureChannel} the request is arriving on.
 * @param session     the {@link Session} the request is arriving on.
 * @return an identity Object that represents the user.
 * @throws UaException if the token is invalid, rejected, or user access is denied.
 */
public Object validateUsernameToken(UserNameIdentityToken token, UserTokenPolicy tokenPolicy,
                                    SecureChannel channel, Session session) throws UaException {
    throw new UaException(StatusCodes.Bad_IdentityTokenInvalid);
}
 
开发者ID:digitalpetri,项目名称:ua-server-sdk,代码行数:18,代码来源:IdentityValidator.java

示例4: validateX509Token

import com.digitalpetri.opcua.stack.core.StatusCodes; //导入方法依赖的package包/类
/**
 * Validate an {@link X509IdentityToken} and return an identity Object that represents the user.
 * <p>
 * This Object should implement equality in such a way that a subsequent identity validation for the same user
 * yields a comparable Object.
 *
 * @param token       the {@link X509IdentityToken}.
 * @param tokenPolicy the {@link UserTokenPolicy} specified by the policyId in {@code token}.
 * @param channel     the {@link SecureChannel} the request is arriving on.
 * @param session     the {@link Session} the request is arriving on.
 * @return an identity Object that represents the user.
 * @throws UaException if the token is invalid, rejected, or user access is denied.
 */
public Object validateX509Token(X509IdentityToken token, UserTokenPolicy tokenPolicy,
                                SecureChannel channel, Session session) throws UaException {
    throw new UaException(StatusCodes.Bad_IdentityTokenInvalid);
}
 
开发者ID:digitalpetri,项目名称:ua-server-sdk,代码行数:18,代码来源:IdentityValidator.java

示例5: validateIssuedIdentityToken

import com.digitalpetri.opcua.stack.core.StatusCodes; //导入方法依赖的package包/类
/**
 * Validate an {@link IssuedIdentityToken} and return an identity Object that represents the user.
 * <p>
 * This Object should implement equality in such a way that a subsequent identity validation for the same user
 * yields a comparable Object.
 *
 * @param token       the {@link IssuedIdentityToken}.
 * @param tokenPolicy the {@link UserTokenPolicy} specified by the policyId in {@code token}.
 * @param channel     the {@link SecureChannel} the request is arriving on.
 * @param session     the {@link Session} the request is arriving on.
 * @return an identity Object that represents the user.
 * @throws UaException if the token is invalid, rejected, or user access is denied.
 */
public Object validateIssuedIdentityToken(IssuedIdentityToken token, UserTokenPolicy tokenPolicy,
                                          SecureChannel channel, Session session) throws UaException {
    throw new UaException(StatusCodes.Bad_IdentityTokenInvalid);
}
 
开发者ID:digitalpetri,项目名称:ua-server-sdk,代码行数:18,代码来源:IdentityValidator.java


注:本文中的com.digitalpetri.opcua.stack.core.StatusCodes.Bad_IdentityTokenInvalid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。