Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7A86E2007D0 for ; Tue, 10 May 2016 12:07:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 78FE51607AA; Tue, 10 May 2016 10:07:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BFB35160877 for ; Tue, 10 May 2016 12:07:39 +0200 (CEST) Received: (qmail 69063 invoked by uid 500); 10 May 2016 10:07:39 -0000 Mailing-List: contact dev-help@shiro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shiro.apache.org Delivered-To: mailing list dev@shiro.apache.org Received: (qmail 68938 invoked by uid 99); 10 May 2016 10:07:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2016 10:07:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2D0AAC0141 for ; Tue, 10 May 2016 10:07:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.179 X-Spam-Level: ** X-Spam-Status: No, score=2.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dMTRmMruyL81 for ; Tue, 10 May 2016 10:07:37 +0000 (UTC) Received: from mail-oi0-f42.google.com (mail-oi0-f42.google.com [209.85.218.42]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 401FF5F3DA for ; Tue, 10 May 2016 10:07:36 +0000 (UTC) Received: by mail-oi0-f42.google.com with SMTP id x19so8736226oix.2 for ; Tue, 10 May 2016 03:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=+wi3Cu9WKgnlEkPB9F0QfDSo9BTc3ArvgsmXma0L/E8=; b=ELCLmU1/SOdyMS2Wdla41lRIvXewqPZP2cpPASpQd3X9ooWbu7soA/8oipSa2qXAuw c9uMxMIstFIav73IdG7pJZ+IiRNE7bQruuiMtZkWAcursTEJ7GrKRVb9rawbihBtur0+ jq7MzU2vXM2rkCdymSy8vDb/F6FquIDzMMIUCfeXPgO3CD4R9xHLALDAawtvVNLGr66g 48BNYMrNj2GSwTpa1GEwRsfje0UIlxqb2TvaWZgLmzMqODUAp6aTSEvc3gKhsnsiF3Rt Tc6Tvll1qfvYf9p/gbUqXpiCmHZ45jyZR2/WUzNJF7yL7C61c678uDXQgg1KxREvxr+7 Yj6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=+wi3Cu9WKgnlEkPB9F0QfDSo9BTc3ArvgsmXma0L/E8=; b=FGLS+28ojX174wGH4zDV/1/UXUggsMJGBsBDbygxeBBjHzk3xT2D4RdRJ+q8+4QSDr gIJiTfsQH+5jdqhX9/NTMs8FAqnAnvZIKWu1Y7bLYfpO3iX1Pigf2TBDQarV3OMzydHE 5JEXiNRA0QrBOkDV8yOULnACGVrkuwCTeL9IYMk9IBSg1wHaTb8XBOHFqvMlKb/+2/B6 FozFpE3mOBm128u0/zUipEPLeFLxOQEZZ43IkaT52w7z3uC/jCgkwTvM/Xy5fwQdSigj cKRLP1VLystQL/qzHCtvMxThZ7oPOPIoqrddsjAdiJiAvFJ9CicBbo6r8x9OluhTvO5v tGUg== X-Gm-Message-State: AOPr4FXPCgpaBAZ/5EznlzV6j4FYCT/F4wNRQzpezGlXht8o/zbDbGJjr+oK+QCuBDaDBtcEepFFHgjE/P5f5Q== MIME-Version: 1.0 X-Received: by 10.157.44.147 with SMTP id p19mr2176059otb.37.1462874848725; Tue, 10 May 2016 03:07:28 -0700 (PDT) Received: by 10.182.18.209 with HTTP; Tue, 10 May 2016 03:07:28 -0700 (PDT) In-Reply-To: References: Date: Tue, 10 May 2016 13:07:28 +0300 Message-ID: Subject: Re: Get list of all logged users from Apache Shiro From: Peter Penzov To: dev@shiro.apache.org Content-Type: multipart/alternative; boundary=001a113e2756b593e705327a17b1 archived-at: Tue, 10 May 2016 10:07:40 -0000 --001a113e2756b593e705327a17b1 Content-Type: text/plain; charset=UTF-8 Thanks, I added cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager securityManager.cacheManager = $cacheManager How I can get the sessions using Java. Can you show me some Java code sample, please? On Tue, May 10, 2016 at 12:56 PM, Thibault TIGEON wrote: > You can find the documentation concerning the cache here : > http://shiro.apache.org/caching.html > > Rgds, > > Thibault > > 2016-05-10 11:33 GMT+02:00 Peter Penzov : > > > Hi Darin, > > Thank you for the response. I use this shiro.ini configuration: > > > > [main] > > shiro.loginUrl = /authentication/login.xhtml > > dataSource = org.apache.shiro.jndi.JndiObjectFactory > > dataSource.resourceName = jdbc/DefaultDB > > dataSource.resourceRef = true > > jdbcRealm = com.crm.web.authentication.JdbcRealm > > jdbcRealm.dataSource = $dataSource > > jdbcRealm.permissionsLookupEnabled = true > > securityManager.realm = $jdbcRealm > > passwordMatcher = > > org.apache.shiro.authc.credential.Sha256CredentialsMatcher > > credentialsMatcher = > > org.apache.shiro.authc.credential.HashedCredentialsMatcher > > credentialsMatcher.hashAlgorithmName = SHA-256 > > credentialsMatcher.storedCredentialsHexEncoded = true > > credentialsMatcher.hashIterations = 5000 > > multipleroles = > com.crm.web.authentication.MultipleRolesAuthorizationFilter > > > > [urls] > > /authentication/login.xhtml = authc > > /authentication/passwordreset.xhtml = anon > > /javax.faces.resource/** = anon > > /** = authc > > > > How I can add cache? > > > > On Tue, May 10, 2016 at 12:18 PM, Darin Gordon wrote: > > > > > If you're using a cache, you could get active sessions from it , > > > deserialize each session, and find those that have the " is > > authenticated " > > > flag set. Authenticated sessions will have user identification in > them, > > > too. > > > On May 10, 2016 2:26 AM, "Peter Penzov" > wrote: > > > > > > > Hi All, > > > > How I can get all logged in users as a list in Apache Shiro? > > > > > > > > Can you give me some example? > > > > > > > > > > --001a113e2756b593e705327a17b1--