/** * Returns if a UsernameToken should be sent. (Web Services binding only.) */ protected boolean getSendUsernameToken() { return getSession().get(SessionParameter.AUTH_SOAP_USERNAMETOKEN, false); }
/** * Gets the proxy user name from the session. * * @return the proxy user name or {@code null} if the user name is not set */ protected String getProxyUser() { Object userObject = getSession().get(SessionParameter.PROXY_USER); if (userObject instanceof String) { return (String) userObject; } return null; }
/** * Returns the authentication provider from the session or <code>null</code> * if no authentication provider is set. */ public static AuthenticationProvider getAuthenticationProvider(BindingSession session) { assert session != null; return (AuthenticationProvider) session.get(AUTHENTICATION_PROVIDER_OBJECT); }
@Override public String getSessionId() { return session.getSessionId(); }
@Override public void clearAllCaches() { session.remove(SpiSessionParameter.LINK_CACHE); }
/** * Gets the password from the session. * * @return the password or {@code null} if the password is not set */ protected String getPassword() { Object passwordObject = getSession().get(SessionParameter.PASSWORD); if (passwordObject instanceof String) { return (String) passwordObject; } return null; }
/** * Returns if a HTTP Basic Authentication header should be sent. (All * bindings.) */ protected boolean getSendBasicAuth() { return getSession().get(SessionParameter.AUTH_HTTP_BASIC, false); }
/** * Gets the proxy password from the session. * * @return the proxy password or {@code null} if the password is not set */ protected String getProxyPassword() { Object passwordObject = getSession().get(SessionParameter.PROXY_PASSWORD); if (passwordObject instanceof String) { return (String) passwordObject; } return null; }
/** * Returns if an OAuth Bearer token header should be sent. (All bindings.) */ protected boolean getSendBearerToken() { return getSession().get(SessionParameter.AUTH_OAUTH_BEARER, false); }
/** * Gets the user name from the session. * * @return the user name or {@code null} if the user name is not set */ protected String getUser() { Object userObject = getSession().get(SessionParameter.USER); if (userObject instanceof String) { return (String) userObject; } return null; }
/** * Returns if a HTTP Basic Authentication header should be sent. (All * bindings.) */ protected boolean getSendBasicAuth() { return getSession().get(SessionParameter.AUTH_HTTP_BASIC, false); }
/** * Gets the password from the session. * * @return the password or {@code null} if the password is not set */ protected String getPassword() { Object passwordObject = getSession().get(SessionParameter.PASSWORD); if (passwordObject instanceof String) { return (String) passwordObject; } return null; }
/** * Returns if an OAuth Bearer token header should be sent. (All bindings.) */ protected boolean getSendBearerToken() { return getSession().get(SessionParameter.AUTH_OAUTH_BEARER, false); }
/** * Gets the bearer token from the session. * * @return the bearer token or {@code null} if the token is not set */ protected String getBearerToken() { Object tokenObject = getSession().get(SessionParameter.OAUTH_ACCESS_TOKEN); if (tokenObject instanceof String) { return (String) tokenObject; } return null; }
/** * Returns if a UsernameToken should be sent. (Web Services binding only.) */ protected boolean getSendUsernameToken() { return getSession().get(SessionParameter.AUTH_SOAP_USERNAMETOKEN, false); }
/** * Gets the bearer token from the session. * * @return the bearer token or {@code null} if the token is not set */ protected String getBearerToken() { Object tokenObject = getSession().get(SessionParameter.OAUTH_ACCESS_TOKEN); if (tokenObject instanceof String) { return (String) tokenObject; } return null; }
/** * Gets the user name from the session. * * @return the user name or {@code null} if the user name is not set */ protected String getUser() { Object userObject = getSession().get(SessionParameter.USER); if (userObject instanceof String) { return (String) userObject; } return null; }
/** * Gets the proxy user name from the session. * * @return the proxy user name or {@code null} if the user name is not set */ protected String getProxyUser() { Object userObject = getSession().get(SessionParameter.PROXY_USER); if (userObject instanceof String) { return (String) userObject; } return null; }
/** * Gets the proxy password from the session. * * @return the proxy password or {@code null} if the password is not set */ protected String getProxyPassword() { Object passwordObject = getSession().get(SessionParameter.PROXY_PASSWORD); if (passwordObject instanceof String) { return (String) passwordObject; } return null; }
/** * Gets the CSRF header name. * * @return the CSRF header name or {@code null} if the CSRF header name is * not set */ protected String getCsrfHeader() { Object csrfHeaderObject = getSession().get(SessionParameter.CSRF_HEADER); if (csrfHeaderObject instanceof String) { return (String) csrfHeaderObject; } return null; } }