00001 /* 00002 * IdentityTransformer.hpp 00003 * 00004 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. 00005 * 00006 * Oracle is a registered trademarks of Oracle Corporation and/or its 00007 * affiliates. 00008 * 00009 * This software is the confidential and proprietary information of Oracle 00010 * Corporation. You shall not disclose such confidential and proprietary 00011 * information and shall use it only in accordance with the terms of the 00012 * license agreement you entered into with Oracle. 00013 * 00014 * This notice may not be removed or altered. 00015 */ 00016 #ifndef COH_IDENTITY_TRANSFORMER_HPP 00017 #define COH_IDENTITY_TRANSFORMER_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 #include "coherence/net/Service.hpp" 00022 #include "coherence/security/auth/Subject.hpp" 00023 00024 COH_OPEN_NAMESPACE2(coherence,security) 00025 00026 using coherence::security::auth::Subject; 00027 using coherence::net::Service; 00028 00029 00030 /** 00031 * IdentityTransformer transforms a Subject to a token that asserts identity. 00032 * 00033 * @author dag 2009.12.04 00034 * 00035 * @since Coherence 3.6 00036 */ 00037 class COH_EXPORT IdentityTransformer 00038 : public interface_spec<IdentityTransformer> 00039 { 00040 // ----- IdentityTransformer interface ---------------------------------- 00041 00042 public: 00043 /** 00044 * Transform a Subject to a token that asserts an identity. 00045 * 00046 * @param vSubject the Subject representing a user. 00047 * @param vService the Service requesting an identity token 00048 * 00049 * @return the token that asserts identity. 00050 * 00051 * @throws SecurityException if the identity transformation fails. 00052 * 00053 * @since Coherence 3.7 added vService param which intentionally breaks 00054 * compatibility with Coherence 3.6 00055 */ 00056 virtual Object::View transformIdentity(Subject::View vSubject, 00057 Service::View vService) const = 0; 00058 }; 00059 00060 COH_CLOSE_NAMESPACE2 00061 00062 #endif // COH_IDENTITY_TRANSFORMER_HPP