Apache Shiro参考手册中文版
shiro.mgt.SecurityManager; import org.apache.shiro.session.Session; import org.apache.shiro.subject.Subject; import org.apache.shiro.util.Factory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 最自然的方式是基于当前用户。 Shiro 的 API 使用它的 Subject 概念从根本上代表了“当前用户”的概念。 几乎在所有的环境中,你可以通过下面的调用获取当前正在执行的用户: 使用 SecurityUtils.getSubject(),我们可以获得当前正在执行的 Subject。Subject 是一个安全术语,它基本上的意思是 “当前正在执行的用户的特定的 界,术语"Subject"可以表示为人类,而且可是第三方进程,cron job,daemon account,或其他类似的东西。它仅仅 意味着“该事物目前正与软件交互”。对于大多数的意图和目的,你可以把 Subject 看成是 Shiro 的"User"概念。 getSubject()在一个独立的应用程序中调用,可以返回一个在应用程序特定位置的基于用户数据的 Subject,并且在服 务器环境中(例如,Web0 码力 | 92 页 | 1.16 MB | 1 年前3Apache Shiro 1.2.x Reference Manual 中文翻译
11. Caching 缓存 12. Concurrency & Multithreading 并发与多线程 13. Testing 测试 14. Custom Subjects 自定义 Subject V. Integration 整合 15. Spring Framework 16. Guice 17. CAS VI. Tools 工具 Apache Shiro 1.2.x Reference shiro.mgt.SecurityManager; import org.apache.shiro.session.Session; import org.apache.shiro.subject.Subject; import org.apache.shiro.util.Factory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 提供了'the current user'概念,即 Subject。 在几乎所有的环境中,你可以通过如下语句得到当前用户的信息: Subject currentUser = SecurityUtils.getSubject(); 使用 SecurityUtils.getSubject(),我们可以获取当前执行的Subject,Subject是一个安全术语 意思是“当前运行用户的指定安全视图(a0 码力 | 196 页 | 2.34 MB | 1 年前3跟我学Shiro - 张开涛
.......................................................................................... 58 SUBJECT ................................................................................................ 可以看到:应用代码直接交互的对象是Subject,也就是说Shiro的对外API核心就是Subject; 其每个 API 的含义: Subject:主体,代表了当前“用户”,这个用户不一定是一个具体的人,与当前应用交互 的任何东西都是 Subject,如网络爬虫,机器人等;即一个抽象概念;所有 Subject 都绑定 到 SecurityManager,与 Subject 的所有交互都会委托给 SecurityManager;可以把 SecurityManager;可以把 Subject 认 为是一个门面;SecurityManager 才是实际的执行者; SecurityManager:安全管理器;即所有与安全有关的操作都会与 SecurityManager 交互; 且它管理着所有 Subject;可以看出它是 Shiro 的核心,它负责与后边介绍的其他组件进行 交互,如果学习过 SpringMVC,你可以把它看成 DispatcherServlet0 码力 | 219 页 | 4.16 MB | 10 月前3Class Layout
location within a derived class object. class Shape { ~~~ }; class Subject { ~~~ }; class ObservedShape: public Shape, public Subject { ~~~ }; The derived class object will have more than a single base *shape = obs; // safe, predefined conversion Subject *subj = obs; // safe, predefined conversion 54 shape subj obs ObservedShape object Shape subobject Subject subobject derived class members Copyright can have more than one valid address. 55 shape subj obs ObservedShape object Shape subobject Subject subobject derived class members Δ Copyright © 2020 by Stephen C. Dewhurst and Daniel Saks 540 码力 | 51 页 | 461.37 KB | 5 月前3Django 2.2.x Documentation
before, they can look a little hard to write at first glance. Fortunately, testing is a very big subject in computer programming, so there’s lots of information out there: A good first look at writing functionality on a personal website: forms.py from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message = forms.CharField(widget=forms.Textarea) sender earlier form used a single field, your_name, a CharField. In this case, our form has four fields: subject, message, sender and cc_myself. CharField, EmailField and BooleanField are just three of the available0 码力 | 2915 页 | 2.83 MB | 1 年前3Django 1.11.x Documentation
before, they can look a little hard to write at first glance. Fortunately, testing is a very big subject in computer programming, so there’s lots of information out there: A good first look at writing functionality on a personal website: forms.py from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message = forms.CharField(widget=forms.Textarea) sender earlier form used a single field, your_name, a CharField. In this case, our form has four fields: subject, message, sender and cc_myself. CharField, EmailField and BooleanField are just three of the available0 码力 | 2747 页 | 2.67 MB | 1 年前3Django 1.11.x Documentation
before, they can look a little hard to write at first glance. Fortunately, testing is a very big subject in computer programming, so there’s lots of information out there: • A good first look at writing tionality on a personal website: forms.py from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message = forms.CharField(widget=forms.Textarea) sender = forms earlier form used a single field, your_name, a CharField. In this case, our form has four fields: subject, message, sender and cc_myself. CharField, EmailField and BooleanField are just three of the available0 码力 | 1878 页 | 6.40 MB | 1 年前3Django 1.8.x Documentation
before, they can look a little hard to write at first glance. Fortunately, testing is a very big subject in computer programming, so there’s lots of information out there: A good first look at writing on a personal Web site: forms.py from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message = forms.CharField(widget=forms.Textarea) sender earlier form used a single field, your_name, a CharField. In this case, our form has four fields: subject, message, sender and cc_myself. CharField, EmailField and BooleanField are just three of the available0 码力 | 2454 页 | 2.85 MB | 1 年前3Django 1.10.x Documentation
before, they can look a little hard to write at first glance. Fortunately, testing is a very big subject in computer programming, so there’s lots of information out there: A good first look at writing functionality on a personal website: forms.py from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message = forms.CharField(widget=forms.Textarea) sender earlier form used a single field, your_name, a CharField. In this case, our form has four fields: subject, message, sender and cc_myself. CharField, EmailField and BooleanField are just three of the available0 码力 | 2538 页 | 2.59 MB | 1 年前3Django 1.8.x Documentation
before, they can look a little hard to write at first glance. Fortunately, testing is a very big subject in computer programming, so there’s lots of information out there: • A good first look at writing tionality on a personal Web site: forms.py from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message = forms.CharField(widget=forms.Textarea) sender = forms earlier form used a single field, your_name, a CharField. In this case, our form has four fields: subject, message, sender and cc_myself. CharField, EmailField and BooleanField are just three of the available0 码力 | 1685 页 | 6.01 MB | 1 年前3
共 896 条
- 1
- 2
- 3
- 4
- 5
- 6
- 90