All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.erigir.wrench.shiro.OauthToken Maven / Gradle / Ivy

Go to download

An extensible implementation of Apache Shiro that uses OAuth as its source with a provided Spring MVC configuration

There is a newer version: 2.2.16+16
Show newest version
package com.erigir.wrench.shiro;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * This class represents a token for a CAS authentication (service ticket + user id + remember me).
 *
 * @since 1.2
 */
public class OauthToken implements AuthenticationToken {
    // the token returned by the oauth server
    private String token = null;

    // is the user in a remember me mode ?
    private boolean isRememberMe = false;

    public OauthToken(String token) {
        this.token = token;
    }

    public String getPrincipal() {
        return "oauth-principal";
    }

    public String getCredentials() {
        return token;
    }

    public boolean isRememberMe() {
        return isRememberMe;
    }

    public void setRememberMe(boolean isRememberMe) {
        this.isRememberMe = isRememberMe;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy