Examples of Authentication


Examples of org.geomajas.security.Authentication

  @Test
  public void testDefaultVisibleAreaOne() throws Exception {
    SecurityContextImpl securityContext = (SecurityContextImpl)this.securityContext;
    List<Authentication> authentications = new ArrayList<Authentication>();
    Authentication auth1 = getAuthentication();
    Authentication auth2 = getAreaAuthentication(1);
    authentications.add(auth1);
    authentications.add(auth2);
    securityContext.setAuthentications("token", authentications);

    Geometry geometry = securityContext.getVisibleArea(LAYER_ID);
View Full Code Here

Examples of org.geomajas.security.Authentication

  @Test
  public void testDefaultVisibleAreaTwo() throws Exception {
    SecurityContextImpl securityContext = (SecurityContextImpl)this.securityContext;
    List<Authentication> authentications = new ArrayList<Authentication>();
    Authentication auth1 = getAreaAuthentication(1);
    Authentication auth2 = getAreaAuthentication(2);
    authentications.add(auth1);
    authentications.add(auth2);
    securityContext.setAuthentications("token", authentications);

    Geometry geometry = securityContext.getVisibleArea(LAYER_ID);
View Full Code Here

Examples of org.hornetq.rest.queue.push.xml.Authentication

      // Really, just create a link with the shipping URL and the type you want posted
      PushRegistration reg = new PushRegistration();
      BasicAuth authType = new BasicAuth();
      authType.setUsername("guest");
      authType.setPassword("guest");
      Authentication auth = new Authentication();
      auth.setType(authType);
      reg.setAuthenticationMechanism(auth);
      XmlLink target = new XmlLink();
      target.setHref("http://localhost:9095/queues/jms.queue.shipping");
      target.setType("application/xml");
      target.setRelationship("destination");
View Full Code Here

Examples of org.jasig.cas.authentication.Authentication

    }
   
    public void testSuccessfulServiceTicket() throws Exception {
        final MockRequestContext context = new MockRequestContext();
        final MockHttpServletRequest request = new MockHttpServletRequest();
        final Authentication authentication = new MutableAuthentication(new SimplePrincipal("scootman28"));
        final TicketGrantingTicket t = new TicketGrantingTicketImpl("TGT-11", authentication, new NeverExpiresExpirationPolicy());
       
        this.ticketRegistry.addTicket(t);
       
        request.setParameter("openid.identity", "http://openid.aol.com/scootman28");
View Full Code Here

Examples of org.jasig.portal.services.Authentication

  /**
   * Initializes the servlet
   * @exception ServletException
   */
  public void init () throws ServletException {
    m_authenticationService = new Authentication();

  }
View Full Code Here

Examples of org.jboss.resteasy.keystone.model.Authentication

   }


   public  Access obtainToken(String projectName)
   {
      Authentication auth = authentication(projectName);
      return tokenFactory.create(auth);
   }
View Full Code Here

Examples of org.jivesoftware.smack.packet.Authentication

    public String authenticate(String username, String password, String resource) throws
            XMPPException {
        // If we send an authentication packet in "get" mode with just the username,
        // the server will return the list of authentication protocols it supports.
        Authentication discoveryAuth = new Authentication();
        discoveryAuth.setType(IQ.Type.GET);
        discoveryAuth.setUsername(username);

        PacketCollector collector =
            connection.createPacketCollector(new PacketIDFilter(discoveryAuth.getPacketID()));
        // Send the packet
        connection.sendPacket(discoveryAuth);
        // Wait up to a certain number of seconds for a response from the server.
        IQ response = (IQ) collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
        if (response == null) {
            throw new XMPPException("No response from the server.");
        }
        // If the server replied with an error, throw an exception.
        else if (response.getType() == IQ.Type.ERROR) {
            throw new XMPPException(response.getError());
        }
        // Otherwise, no error so continue processing.
        Authentication authTypes = (Authentication) response;
        collector.cancel();

        // Now, create the authentication packet we'll send to the server.
        Authentication auth = new Authentication();
        auth.setUsername(username);

        // Figure out if we should use digest or plain text authentication.
        if (authTypes.getDigest() != null) {
            auth.setDigest(connection.getConnectionID(), password);
        }
        else if (authTypes.getPassword() != null) {
            auth.setPassword(password);
        }
        else {
            throw new XMPPException("Server does not support compatible authentication mechanism.");
        }

        auth.setResource(resource);

        collector = connection.createPacketCollector(new PacketIDFilter(auth.getPacketID()));
        // Send the packet.
        connection.sendPacket(auth);
        // Wait up to a certain number of seconds for a response from the server.
        response = (IQ) collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
        if (response == null) {
View Full Code Here

Examples of org.jtalks.jcommune.plugin.auth.poulpe.dto.Authentication

    }

    private Map<String, String> parseUserDetails(Representation repr) throws JAXBException, IOException {
        JAXBContext context = JAXBContext.newInstance(Authentication.class);
        Unmarshaller unmarshaller = context.createUnmarshaller();
        Authentication auth = (Authentication) unmarshaller.unmarshal(repr.getStream());

        Map<String, String> authInfo = new HashMap<>();
        authInfo.put("username", auth.getCredintals().getUsername());
        authInfo.put("email", auth.getProfile().getEmail());
        authInfo.put("firstName", auth.getProfile().getFirstName());
        authInfo.put("lastName", auth.getProfile().getLastName());
        authInfo.put("enabled", String.valueOf(auth.getProfile().isEnabled()));
        return authInfo;
    }
View Full Code Here

Examples of org.mule.api.security.Authentication

    public void doFilter(MuleEvent event)
        throws SecurityException, UnknownAuthenticationTypeException, CryptoFailureException,
        SecurityProviderNotFoundException, EncryptionStrategyNotFoundException, InitialisationException
    {
        Authentication auth = event.getSession().getSecurityContext().getAuthentication();
        if (auth == null)
        {
            throw new UnauthorisedException(CoreMessages.authNoCredentials());
        }
View Full Code Here

Examples of org.olat.basesecurity.Authentication

    saveButton.setVisible(visible);
    cancelButton.setVisible(visible);
    passwordEl.setVisible(visible);
    confirmPasswordEl.setVisible(visible);
   
    Authentication auth = ManagerFactory.getManager().findAuthentication(ureq.getIdentity(), WebDAVAuthManager.PROVIDER_WEBDAV);
    String passwordPlaceholderKey = auth == null ? "pwdav.password.not_set" : "pwdav.password.set";
    String passwordPlaceholder = getTranslator().translate(passwordPlaceholderKey);
    passwordStaticEl.setValue(passwordPlaceholder);
   
    String buttonPlaceholderKey = auth == null ? "pwdav.password.new" : "pwdav.password.change";
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.