X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=security%2Fruntime%2Forg.argeo.security.core%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fsecurity%2Fcore%2FInternalAuthentication.java;h=267ddd312af8d0741c1876bbd9a86b388f7195ef;hb=7698d591d346f7c841e71bc83e497afafd9b3b6b;hp=f20f6805bdb5c4a6042ce3a4a631f330365e18bc;hpb=977a7a352131b082a98739f15e421f2bff747567;p=lgpl%2Fargeo-commons.git diff --git a/security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/core/InternalAuthentication.java b/security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/core/InternalAuthentication.java index f20f6805b..267ddd312 100644 --- a/security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/core/InternalAuthentication.java +++ b/security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/core/InternalAuthentication.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Mathieu Baudier + * Copyright (C) 2007-2012 Argeo GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.argeo.security.core; import org.argeo.security.SystemAuthentication; @@ -21,11 +20,15 @@ import org.springframework.security.GrantedAuthority; import org.springframework.security.GrantedAuthorityImpl; import org.springframework.security.adapters.PrincipalSpringSecurityUserToken; +/** A token base on a system key used to request a system authentication. */ public class InternalAuthentication extends PrincipalSpringSecurityUserToken implements SystemAuthentication { private static final long serialVersionUID = -6783376375615949315L; - public final static String DEFAULT_SYSTEM_USERNAME = "system"; + /** 'admin' for consistency with JCR */ + public final static String DEFAULT_SYSTEM_USERNAME = "admin"; public final static String DEFAULT_SYSTEM_ROLE = "ROLE_SYSTEM"; + public final static String SYSTEM_KEY_PROPERTY = "argeo.security.systemKey"; + public final static String SYSTEM_KEY_DEFAULT = "argeo"; public InternalAuthentication(String key, String systemUsername, String systemRole) {