@SuppressWarnings("unchecked") public static CredentialIdentity<Object> createIdentity(final Principal principal, final Object cred) { if( principal == null && cred == null ) return NULL_IDENTITY; return createIdentity(principal,cred, null); }
public static CredentialIdentityFactory getInstance() { if(_instance == null) _instance = new CredentialIdentityFactory(); return _instance; }
public static IdentityFactory getFactory(IdentityType type) { if(type == IdentityType.CREDENTIAL) return CredentialIdentityFactory.getInstance(); if(type == IdentityType.CERTIFICATE) return CertificateIdentityFactory.getInstance(); throw PicketBoxMessages.MESSAGES.identityTypeFactoryNotImplemented(type != null ? type.name() : null); }
public static IdentityFactory getFactory(IdentityType type) { if(type == IdentityType.CREDENTIAL) return CredentialIdentityFactory.getInstance(); if(type == IdentityType.CERTIFICATE) return CertificateIdentityFactory.getInstance(); throw PicketBoxMessages.MESSAGES.identityTypeFactoryNotImplemented(type != null ? type.name() : null); }
@SuppressWarnings("unchecked") public static CredentialIdentity<Object> createIdentity(final Principal principal, final Object cred) { if( principal == null && cred == null ) return NULL_IDENTITY; return createIdentity(principal,cred, null); }
public static CredentialIdentityFactory getInstance() { if(_instance == null) _instance = new CredentialIdentityFactory(); return _instance; }
public static Identity getIdentity( Principal principal, Object credential ) { return CredentialIdentityFactory.createIdentity( principal, credential ); }
public static Identity getIdentity( Principal principal, Object credential ) { return CredentialIdentityFactory.createIdentity( principal, credential ); }
protected void setSubjectInfo(final Principal principal, final Subject subject, final Object credential) { SecurityContext securityContext = SecurityContextAssociation.getSecurityContext(); Role roleGroup = getRoleGroup(subject); Identity identity = CredentialIdentityFactory.createIdentity(principal, credential, roleGroup); securityContext.getUtil().createSubjectInfo(identity, subject); }
if (rolesGroup != null) { RoleGroup roleGroup = new SimpleRoleGroup(rolesGroup); Identity identity = CredentialIdentityFactory.createIdentity(principal, credential, roleGroup); new_jb_securityContext.getUtil().createSubjectInfo(identity, subject); new_jb_securityContext.getSubjectInfo().setRoles(roleGroup); } else { Identity identity = CredentialIdentityFactory.createIdentity(principal, credential); new_jb_securityContext.getUtil().createSubjectInfo(identity, subject);
if (rolesGroup != null) { RoleGroup roleGroup = new SimpleRoleGroup(rolesGroup); Identity identity = CredentialIdentityFactory.createIdentity(principal, credential, roleGroup); new_jb_securityContext.getUtil().createSubjectInfo(identity, subject); new_jb_securityContext.getSubjectInfo().setRoles(roleGroup); } else { Identity identity = CredentialIdentityFactory.createIdentity(principal, credential); new_jb_securityContext.getUtil().createSubjectInfo(identity, subject);