Java Code Examples for org.apache.sshd.server.session.ServerSession#getAttribute()
The following examples show how to use
org.apache.sshd.server.session.ServerSession#getAttribute() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenEJBCommands.java From tomee with Apache License 2.0 | 5 votes |
@Override public void setSession(final ServerSession session) { final String username = session.getAttribute(OpenEJBJaasPasswordAuthenticator.USERNAME_KEY); if (username == null) { throw new IllegalStateException("No username in the session"); } setUsername(username); loginContext = session.getAttribute(OpenEJBJaasPasswordAuthenticator.LOGIN_CONTEXT_KEY); }
Example 2
Source File: DefaultSshAuthenticator.java From onedev with MIT License | 4 votes |
@Override public Long getPublicKeyOwnerId(ServerSession session) { return session.getAttribute(ATTR_PUBLIC_KEY_OWNER_ID); }