• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java PsCookie类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.takes.facets.auth.PsCookie的典型用法代码示例。如果您正苦于以下问题:Java PsCookie类的具体用法?Java PsCookie怎么用?Java PsCookie使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

PsCookie类属于org.takes.facets.auth包,在下文中一共展示了PsCookie类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: auth

点赞 2

import org.takes.facets.auth.PsCookie; //导入依赖的package包/类
/**
 * Authenticated.
 * @param take Take
 * @return Authenticated takes
 */
private static Take auth(final Take take) {
    final String key = Manifests.read("libre-FacebookId");
    return new TkAuth(
        take,
        new PsChain(
            new PsFake(key.startsWith("XXXX") || key.startsWith("${")),
            new PsByFlag(
                new PsByFlag.Pair(
                    PsFacebook.class.getSimpleName(),
                    new PsFacebook(
                        key,
                        Manifests.read("libre-FacebookSecret")
                    )
                ),
                new PsByFlag.Pair(
                    PsLogout.class.getSimpleName(),
                    new PsLogout()
                )
            ),
            new PsCookie(
                new CcSafe(
                    new CcHex(
                        new CcXOR(
                            new CcSalted(new CcCompact()),
                            Manifests.read("libre-SecurityKey")
                        )
                    )
                )
            )
        )
    );
}
 

开发者ID:libreio,
项目名称:libre,
代码行数:38,
代码来源:TkApp.java

示例2: make

点赞 2

import org.takes.facets.auth.PsCookie; //导入依赖的package包/类
/**
 * Authenticated.
 * @param take Take
 * @return Authenticated take
 */
private static Take make(final Take take) {
    return new TkAuth(
        take,
        new PsChain(
            new TkAppAuth.FakePass(),
            new PsByFlag(
                new PsByFlag.Pair(
                    PsGithub.class.getSimpleName(),
                    new PsGithub(
                        Manifests.read("Thindeck-GithubId"),
                        Manifests.read("Thindeck-GithubSecret")
                    )
                ),
                new PsByFlag.Pair(
                    "fake-user",
                    new TkAppAuth.FakePass()
                ),
                new PsByFlag.Pair(
                    PsLogout.class.getSimpleName(),
                    new PsLogout()
                )
            ),
            new PsCookie(
                new CcSafe(
                    new CcHex(
                        new CcXOR(
                            new CcSalted(new CcCompact()),
                            Manifests.read("Thindeck-SecurityKey")
                        )
                    )
                )
            )
        )
    );
}
 

开发者ID:yegor256,
项目名称:thindeck,
代码行数:41,
代码来源:TkAppAuth.java

示例3: auth

点赞 2

import org.takes.facets.auth.PsCookie; //导入依赖的package包/类
/**
 * Auth.
 * @param take Takes
 * @return Authenticated takes
 */
private static Take auth(final Take take) {
    return new TkAuth(
        new TkFork(
            new FkParams(
                PsByFlag.class.getSimpleName(),
                Pattern.compile(".+"),
                new TkRedirect()
            ),
            new FkFixed(take)
        ),
        new PsChain(
            new PsFake(
                Manifests.read("ThreeCopies-DynamoKey").startsWith("AAAA")
            ),
            new PsByFlag(
                new PsByFlag.Pair(
                    PsGithub.class.getSimpleName(),
                    new PsGithub(
                        Manifests.read("ThreeCopies-GithubId"),
                        Manifests.read("ThreeCopies-GithubSecret")
                    )
                ),
                new PsByFlag.Pair(
                    PsLogout.class.getSimpleName(),
                    new PsLogout()
                )
            ),
            new PsCookie(
                new CcSafe(
                    new CcHex(
                        new CcXor(
                            new CcSalted(new CcCompact()),
                            Manifests.read("ThreeCopies-SecurityKey")
                        )
                    )
                )
            )
        )
    );
}
 

开发者ID:yegor256,
项目名称:threecopies,
代码行数:46,
代码来源:TkApp.java

示例4: make

点赞 2

import org.takes.facets.auth.PsCookie; //导入依赖的package包/类
/**
 * Authenticated.
 * @param take Takes
 * @return Authenticated takes
 */
private static Take make(final Take take) {
    return new TkAuth(
        new TkFork(
            new FkParams(
                PsByFlag.class.getSimpleName(),
                Pattern.compile(".+"),
                new TkRedirect()
            ),
            new FkFixed(take)
        ),
        new PsChain(
            new PsFake(
                Manifests.read("Jare-DynamoKey").startsWith("AAAA")
            ),
            new PsByFlag(
                new PsByFlag.Pair(
                    PsGithub.class.getSimpleName(),
                    new PsGithub(
                        Manifests.read("Jare-GithubId"),
                        Manifests.read("Jare-GithubSecret")
                    )
                ),
                new PsByFlag.Pair(
                    PsLogout.class.getSimpleName(),
                    new PsLogout()
                )
            ),
            new PsCookie(
                new CcSafe(
                    new CcHex(
                        new CcXor(
                            new CcSalted(new CcCompact()),
                            Manifests.read("Jare-SecurityKey")
                        )
                    )
                )
            )
        )
    );
}
 

开发者ID:yegor256,
项目名称:jare,
代码行数:46,
代码来源:TkAppAuth.java

示例5: make

点赞 2

import org.takes.facets.auth.PsCookie; //导入依赖的package包/类
/**
 * Authenticated.
 * @param take Takes
 * @return Authenticated takes
 */
private static Take make(final Take take) {
    return new TkAuth(
        new TkFork(
            new FkParams(
                PsByFlag.class.getSimpleName(),
                Pattern.compile(".+"),
                new TkRedirect()
            ),
            new FkFixed(take)
        ),
        new PsChain(
            new PsFake(
                Manifests.read("Wring-DynamoKey").startsWith("AAAA")
            ),
            new PsByFlag(
                new PsByFlag.Pair(
                    PsGithub.class.getSimpleName(),
                    new PsGithub(
                        Manifests.read("Wring-GithubId"),
                        Manifests.read("Wring-GithubSecret")
                    )
                ),
                new PsByFlag.Pair(
                    PsLogout.class.getSimpleName(),
                    new PsLogout()
                )
            ),
            new PsCookie(
                new CcSafe(
                    new CcHex(
                        new CcXor(
                            new CcSalted(new CcCompact()),
                            Manifests.read("Wring-SecurityKey")
                        )
                    )
                )
            )
        )
    );
}
 

开发者ID:yegor256,
项目名称:wring,
代码行数:46,
代码来源:TkAppAuth.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)