Examples of CredentialsAccessor


Examples of org.gatein.wsrp.wss.credentials.CredentialsAccessor

   protected boolean handleUserAuthentication(Map<String, Object> propertyMap)
   {
      if (propertyMap.containsKey(WSHandlerConstants.USER) && propertyMap.get(WSHandlerConstants.USER).equals(GTN_CURRENT_USER))
      {
         CredentialsAccessor credentialsAccessor = CredentialsAccess.getInstance().getCredentialsAccessor();
         if (credentialsAccessor != null && credentialsAccessor.getCredentials() != null)
         {
            Credentials credentials = credentialsAccessor.getCredentials();
            propertyMap.put(WSHandlerConstants.USER, credentials.getUsername());

            String actionProperty = (String)propertyMap.get(WSHandlerConstants.ACTION);
            //Note: the action property can contain a space separated list of multiple actions
            if (actionProperty != null && actionProperty.contains(GTN_USERNAME_TOKEN_IF_AUTHENTICATED))
View Full Code Here

Examples of org.gatein.wsrp.wss.credentials.CredentialsAccessor

   protected boolean handleUserAuthentication(Map<String, Object> propertyMap)
   {
      if (propertyMap.containsKey(WSHandlerConstants.USER) && propertyMap.get(WSHandlerConstants.USER).equals(GTN_CURRENT_USER))
      {
         CredentialsAccessor credentialsAccessor = WebServiceSecurityFactory.getInstance().getCredentialsAccessor();
         if (credentialsAccessor != null && credentialsAccessor.getCredentials() != null)
         {
            Credentials credentials = credentialsAccessor.getCredentials();
            propertyMap.put(WSHandlerConstants.USER, credentials.getUsername());

            String actionProperty = (String)propertyMap.get(WSHandlerConstants.ACTION);
            //Note: the action property can contain a space separated list of multiple actions
            if (actionProperty != null && actionProperty.contains(GTN_USERNAME_TOKEN_IF_AUTHENTICATED))
View Full Code Here

Examples of org.gatein.wsrp.wss.credentials.CredentialsAccessor

            WSPasswordCallback wspasswordCallBack = (WSPasswordCallback)callback;

            //This callback is only for Username Tokens, not for authentication/signing of the soap message
            if (wspasswordCallBack.getUsage() == (WSPasswordCallback.USERNAME_TOKEN))
            {
               CredentialsAccessor credentialsAccessor = WebServiceSecurityFactory.getInstance().getCredentialsAccessor();

               if (credentialsAccessor != null && credentialsAccessor.getCredentials() != null)
               {
                  Credentials credentials = credentialsAccessor.getCredentials();
                  if (credentials.getUsername().equals(wspasswordCallBack.getIdentifier()))
                  {
                     wspasswordCallBack.setPassword(credentials.getPassword());
                  }
                  else
View Full Code Here

Examples of org.gatein.wsrp.wss.credentials.CredentialsAccessor

   protected boolean handleUserAuthentication(Map<String, Object> propertyMap)
   {
      final Object userValue = propertyMap.get(WSHandlerConstants.USER);
      if (GTN_CURRENT_USER.equals(userValue))
      {
         CredentialsAccessor credentialsAccessor = CredentialsAccess.getInstance().getCredentialsAccessor();
         if (credentialsAccessor != null && credentialsAccessor.getCredentials() != null)
         {
            Credentials credentials = credentialsAccessor.getCredentials();
            propertyMap.put(WSHandlerConstants.USER, credentials.getUsername());

            String actionProperty = (String)propertyMap.get(WSHandlerConstants.ACTION);
            //Note: the action property can contain a space separated list of multiple actions
            if (actionProperty != null && actionProperty.contains(GTN_USERNAME_TOKEN_IF_AUTHENTICATED))
View Full Code Here

Examples of org.gatein.wsrp.wss.credentials.CredentialsAccessor

   protected boolean handleUserAuthentication(Map<String, Object> propertyMap)
   { 
      if (propertyMap.containsKey(WSHandlerConstants.USER) && propertyMap.get(WSHandlerConstants.USER).equals(GTN_CURRENT_USER))
      {
         CredentialsAccessor credentialsAccessor = WebServiceSecurityFactory.getInstance().getCredentialsAccessor();
         if (credentialsAccessor != null && credentialsAccessor.getCredentials() != null)
         {
            Credentials credentials = credentialsAccessor.getCredentials();
            propertyMap.put(WSHandlerConstants.USER, credentials.getUsername());
           
            String actionProperty = (String)propertyMap.get(WSHandlerConstants.ACTION);
            //Note: the action property can contain a space separated list of multiple actions
            if (actionProperty != null && actionProperty.contains(GTN_USERNAME_TOKEN_IF_AUTHENTICATED))
View Full Code Here

Examples of org.gatein.wsrp.wss.credentials.CredentialsAccessor

            WSPasswordCallback wspasswordCallBack = (WSPasswordCallback) callback;

            //This callback is only for Username Tokens, not for authentication/signing of the soap message
            if (wspasswordCallBack.getUsage() == (WSPasswordCallback.USERNAME_TOKEN))
            {
               CredentialsAccessor credentialsAccessor = WebServiceSecurityFactory.getInstance().getCredentialsAccessor();

               if (credentialsAccessor != null && credentialsAccessor.getCredentials() != null)
               {
                  Credentials credentials = credentialsAccessor.getCredentials();
                  if (credentials.getUsername() == wspasswordCallBack.getIdentifier())
                  {
                     wspasswordCallBack.setPassword(credentials.getPassword());
                  }
                  else
View Full Code Here

Examples of org.gatein.wsrp.wss.credentials.CredentialsAccessor

   protected boolean handleUserAuthentication(Map<String, Object> propertyMap)
   {
      final Object userValue = propertyMap.get(WSHandlerConstants.USER);
      if (GTN_CURRENT_USER.equals(userValue))
      {
         CredentialsAccessor credentialsAccessor = CredentialsAccess.getInstance().getCredentialsAccessor();
         if (credentialsAccessor != null && credentialsAccessor.getCredentials() != null)
         {
            Credentials credentials = credentialsAccessor.getCredentials();
            propertyMap.put(WSHandlerConstants.USER, credentials.getUsername());

            String actionProperty = (String)propertyMap.get(WSHandlerConstants.ACTION);
            //Note: the action property can contain a space separated list of multiple actions
            if (actionProperty != null && actionProperty.contains(GTN_USERNAME_TOKEN_IF_AUTHENTICATED))
View Full Code Here

Examples of org.gatein.wsrp.wss.credentials.CredentialsAccessor

            WSPasswordCallback wspasswordCallBack = (WSPasswordCallback)callback;

            //This callback is only for Username Tokens, not for authentication/signing of the soap message
            if (wspasswordCallBack.getUsage() == (WSPasswordCallback.USERNAME_TOKEN))
            {
               CredentialsAccessor credentialsAccessor = CredentialsAccess.getInstance().getCredentialsAccessor();

               if (credentialsAccessor != null && credentialsAccessor.getCredentials() != null)
               {
                  Credentials credentials = credentialsAccessor.getCredentials();
                  if (credentials.getUsername().equals(wspasswordCallBack.getIdentifier()))
                  {
                     wspasswordCallBack.setPassword(credentials.getPassword());
                  }
                  else
View Full Code Here

Examples of org.gatein.wsrp.wss.credentials.CredentialsAccessor

         log.debug("Attempting to convert security context to WS-Security header");

         CommonMessageContext ctx = (CommonMessageContext)soapMessageContext;

         CredentialsAccessor credentialsAccessor = CredentialsAccess.getInstance().getCredentialsAccessor();

         if (credentialsAccessor != null && credentialsAccessor.getCredentials() != null)
         {
            Credentials credentials = credentialsAccessor.getCredentials();
            ctx.put(BindingProvider.USERNAME_PROPERTY, credentials.getUsername());
            ctx.put(BindingProvider.PASSWORD_PROPERTY, credentials.getPassword());
         }
         else
         {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.