extensions/guacamole-auth-openid/src/main/java/org/apache/guacamole/auth/openid/token/StateService.java
/**
     * Generate a new state
     * @return
     * state string
     */
Generate a new state
@return
state string
Generate a new state @return state string
public String generate() {
        Random sr = new Random();
        byte seed[] = new byte[15];
        sr.nextBytes(seed);
        String data = new String(Base64.getEncoder().encode(seed));
        data = data.replaceAll("/\\+/", "");
        this.request.getSession().setAttribute(this.STATE_VARIABLE_NAME, data);
        return data;
    }
public String generate ( ) { Random sr = new Random ( ) ; byte seed [ ] = new byte [ 15 ] ; sr . nextBytes ( seed ) ; String data = new String ( Base64 . getEncoder ( ) . encode ( seed ) ) ; data = data . replaceAll ( "/\\+/" , "" ) ; this . request . getSession ( ) . setAttribute ( this . STATE_VARIABLE_NAME , data ) ; return data ; }
Generate a new state
 @return
 state string
Generate a new state @return state string
// remove + character which are interpreted as spaces.