Spec-Zone.ru › OpenJDK 8

Класс AuthPermission

  • java.lang.Object
    • java.security.Permission
      • java.security.BasicPermission
        • javax.security.auth.AuthPermission
Все реализованные интерфейсы:
Serializable, Guard

public final class AuthPermission
extends BasicPermission

Этот класс предназначен для разрешений на аутентификацию. Разрешение AuthPermission содержит имя (также называемое «именем цели»), но не список действий; у вас есть разрешение с указанным именем или нет.

Имя цели — это имя параметра конфигурации безопасности (см. ниже). В настоящее время объект AuthPermission используется для защиты доступа к объектам Policy, Subject, LoginContext и Configuration.

Возможные имена целей для разрешения на аутентификацию:

doAs -                  allow the caller to invoke the
                               Subject.doAs methods.

      doAsPrivileged -        allow the caller to invoke the
                               Subject.doAsPrivileged methods.

      getSubject -            allow for the retrieval of the
                              Subject(s) associated with the
                              current Thread.

      getSubjectFromDomainCombiner -  allow for the retrieval of the
                              Subject associated with the
                              a  SubjectDomainCombiner.

      setReadOnly -           allow the caller to set a Subject
                              to be read-only.

      modifyPrincipals -      allow the caller to modify the  Set
                              of Principals associated with a
                               Subject

      modifyPublicCredentials - allow the caller to modify the
                               Set of public credentials
                              associated with a  Subject

      modifyPrivateCredentials - allow the caller to modify the
                               Set of private credentials
                              associated with a  Subject

      refreshCredential -     allow code to invoke the  refresh
                              method on a credential which implements
                              the  Refreshable interface.

      destroyCredential -     allow code to invoke the  destroy
                              method on a credential  object
                              which implements the  Destroyable
                              interface.

      createLoginContext.{name} -  allow code to instantiate a
                               LoginContext with the
                              specified name.  name
                              is used as the index into the installed login
                               Configuration
                              (that returned by
                               Configuration.getConfiguration()).
                              name can be wildcarded (set to '*')
                              to allow for any name.

      getLoginConfiguration - allow for the retrieval of the system-wide
                              login Configuration.

      createLoginConfiguration.{type} - allow code to obtain a Configuration
                              object via
                               Configuration.getInstance.

      setLoginConfiguration - allow for the setting of the system-wide
                              login Configuration.

      refreshLoginConfiguration - allow for the refreshing of the system-wide
                              login Configuration.

Следующее имя цели устарело в пользу createLoginContext.{name}.

createLoginContext -    allow code to instantiate a
                               LoginContext.

javax.security.auth.Policy устарело в пользу java.security.Policy. Поэтому следующие имена целей также устарели:

getPolicy -             allow the caller to retrieve the system-wide
                              Subject-based access control policy.

      setPolicy -             allow the caller to set the system-wide
                              Subject-based access control policy.

      refreshPolicy -         allow the caller to refresh the system-wide
                              Subject-based access control policy.
См. также:
Сериализованная форма

Конструкторы

Конструктор и описание
AuthPermission(String name)

Создаёт новое разрешение AuthPermission с указанным именем.

AuthPermission(String name, String actions)

Создаёт новый объект AuthPermission с указанным именем.

Методы

Методы, унаследованные от класса java.security.BasicPermission

equals, getActions, hashCode, implies, newPermissionCollection

Методы, унаследованные от класса java.security.Permission

checkGuard, getName, toString

Методы, унаследованные от класса java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Конструкторы

AuthPermission

public AuthPermission(String name)

Создаёт новое разрешение AuthPermission с указанным именем. Имя — это символическое имя AuthPermission.

Параметры:
name - имя AuthPermission
Исключения:
NullPointerException - если name равно null.
IllegalArgumentException - если name пусто.

AuthPermission

public AuthPermission(String name,
                      String actions)

Создаёт новый объект AuthPermission с указанным именем. Имя — это символическое имя AuthPermission, а строка действий в настоящее время не используется и должна быть равна null.

Параметры:
name - имя AuthPermission
actions - должно быть равно null.
Исключения:
NullPointerException - если name равно null.
IllegalArgumentException - если name пусто.

© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API