@Override @Nullable public Principal getUserPrincipal() { return getFacesContext().getExternalContext().getUserPrincipal(); }
public static Principal userPrincipal() { return FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal(); } }
@Override @Nullable public Principal getUserPrincipal() { return getFacesContext().getExternalContext().getUserPrincipal(); }
/** * {@inheritDoc} */ public Principal getUserPrincipal() { return wrapped.getUserPrincipal(); }
public Principal getUserPrincipal() { return original.getUserPrincipal(); }
public Principal getUserPrincipal() { return _delegate.getUserPrincipal(); }
/** * returns the userPrincipal Name * * @return */ public String getUserPrincipal() { FacesContext context = FacesContext.getCurrentInstance(); ExternalContext externalContext = context.getExternalContext(); return externalContext.getUserPrincipal() != null ? externalContext.getUserPrincipal().toString() : null; }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getUserPrincipal} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getUserPrincipal() */ @Override public Principal getUserPrincipal() { return getWrapped().getUserPrincipal(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getUserPrincipal} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getUserPrincipal() */ @Override public Principal getUserPrincipal() { return getWrapped().getUserPrincipal(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getUserPrincipal} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getUserPrincipal() */ @Override public Principal getUserPrincipal() { return getWrapped().getUserPrincipal(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getUserPrincipal} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getUserPrincipal() */ public Principal getUserPrincipal() { return getWrapped().getUserPrincipal(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getUserPrincipal} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getUserPrincipal() */ @Override public Principal getUserPrincipal() { return getWrapped().getUserPrincipal(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getUserPrincipal} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getUserPrincipal() */ @Override public Principal getUserPrincipal() { return getWrapped().getUserPrincipal(); }
public void setupCurrentUser() { Principal currentUser = FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal(); sessionContext.set("currentUser", currentUser); }
@Override @Nullable public Principal getUserPrincipal() { return getFacesContext().getExternalContext().getUserPrincipal(); }
@Override public Principal getUserPrincipal() { return getWrapped().getUserPrincipal(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getUserPrincipal} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getUserPrincipal() */ @Override public Principal getUserPrincipal() { return getWrapped().getUserPrincipal(); }
@Unwrap @Override public Principal getUserPrincipal() { FacesContext facesContext = FacesContext.getCurrentInstance(); if ( facesContext != null ) { return facesContext.getExternalContext().getUserPrincipal(); } return super.getUserPrincipal(); }
private Optional<NuxeoOAuth2Token> getCurrentNuxeoToken(OneDriveBlobProvider provider) { Map<String, Serializable> filter = new HashMap<>(); filter.put(NuxeoOAuth2Token.KEY_NUXEO_LOGIN, FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal().getName()); return provider.getOAuth2Provider() .getCredentialDataStore() .query(filter) .stream() .map(NuxeoOAuth2Token::new) .findFirst(); }
public void preRender(CompenentSystemEvent event) { ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext(); if (ec.getUserPrincipal() == null) { ec.redirect(ec.getRequestContextPath() + "/login.xhtml"); } }