Questions tagged [principal]

This tag doesn't currently have an excerpt. Help contribute by writing one

173 questions
2
votes
1 answer

Fundamental difference between Generic Principal and Forms Authentication in context of ASP.NET?

What exactly is the difference between Forms Authentication and Generic Principal? If I use Forms Authentication in ASP.NET, what advantage would I have by implementing the Generic Principal as well as Generic Identity over not implementing these?…
2
votes
1 answer

Problem using custom principal and identity with WCF services

We are using a custom principal and identity type (ProdigyPrincipal/ProdigyIdentity) because we need extra information within our programs and services. In the program we set the principal and identity. When communicating with a WCF service the…
Hans Leeuw
  • 31
  • 1
  • 3
2
votes
2 answers

Get Custom Property Of User Principal

I have a custom user details object with first name part of it. Below username works, but I want something like the second to work. How can I access this custom property?
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
2
votes
0 answers

Mvc Identity Longin ClaimsPrincipal value always null

This is my Login controller public class AccountController : BaseController { [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult Login(LoginViewModel model, string returnUrl) { …
Leon Huang
  • 103
  • 11
2
votes
1 answer

Spring websockets without principal

I am trying to implement a simple websockets application that can send messages from one endpoint to a specified session established elsewhere. So far I have been able to use the annotation @SendToUser() in order for a client to subscribe to a…
2
votes
0 answers

Wildfly custom JAAS LoginModule with custom Principal in RunAs and unauthenticated

I'm looking for help with custom Principal used in custom LoginModule on Wildfly10/Jboss 7. I would like to put some additional data into my custom principal connected with authorization as well as audit data such as sessionId gathered from…
2
votes
1 answer

OOP: Bounds of a variable's scope

Consider the following java code: public class Main() { //Line 1 public static void main(String[] args) { //Line 2 System.out.println("Hello World."); //Line 3 …
Jean Valjean
  • 747
  • 1
  • 9
  • 30
2
votes
1 answer

Java Spring MVC integration test create OAuth2 Principal

I've been trying to write an integration test for our Spring MVC application. We're using oAuth2 for authentication. Spring in this case gives us a Principal instance which we use to determine which entities we have to send back to the client. In…
irundaia
  • 1,720
  • 17
  • 25
2
votes
0 answers

Dynamic Spring @Query with principal and ternary operator

According to this https://spring.io/blog/2014/07/15/spel-support-in-spring-data-jpa-query-definitions I should be able construct a conditional query: @Query("select o from BusinessObject o where o.owner.emailAddress like "+ …
2
votes
0 answers

Why is my authentication object null despite the fact my authentication success handler is being called?

I’m using Spring 3.2.11.RELEASE and Spring Security 3.1.4.RELEASE on JBoss WildFly 10.0.0.CR2. I have the following set up in my application context …
Dave
  • 15,639
  • 133
  • 442
  • 830
2
votes
0 answers

PrincipalContext and error Value was invalid

I have a WCF service with the code: var ctx = new PrincipalContext(IsLocalMachine(strDomain) ? ContextType.Machine : ContextType.Domain); Principal principal = Principal.FindByIdentity(ctx, name) I have 3 different test environments: 1: IIS 8.5 …
2
votes
0 answers

Get identity-level token for Windows user?

I want to create a WindowsIdentity for a given user. I don't need it for impersonation, just for group membership checks. I need it to work with and without a domain (none of that S4U Kerberos delegation stuff). The constructor for WindowsIdentity…
MichaelGG
  • 9,976
  • 1
  • 39
  • 82
2
votes
0 answers

PCA how to plot effect of one component

EDIT AT THE BOTTOM CONTAINING SOLUTION I performed PCA on my dataset, resulting in the eigenvectors, eigenvalues and the mean. I want to plot the effects of varying one principal component but I can't figure out how. So I want to create a plot like…
Aero
  • 59
  • 6
2
votes
2 answers

Inexplainable InvalidOperationException with GroupPrincipal and SAM PrincipalContext

I am trying to create a Principal like this: PrincipalContext pc = new PrincipalContext(ContextType.Machine); GroupPrincipal group = new GroupPrincipal(pc); group.Name = "Some Group Name"; group.Description = "Some Group Name…
AlexYu
  • 145
  • 2
  • 8
2
votes
2 answers

Why does my FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal() code runs to NullPointer?

I have a stateless bean which has a method, where I want to get the current/logged user. My code to get it: Principal p1 = FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal(); But I am getting nullpointer exception on this.…
victorio
  • 6,224
  • 24
  • 77
  • 113