# Spring security does not accept "at+jwt"

**URL:** <https://community.auth0.com/t/spring-security-does-not-accept-at-jwt/52965>\
**Category:** JWT.io\
**Tags:** jwt, spring-security\
**Created:** [November 10, 2020, 6:45am UTC](https://community.auth0.com/t/spring-security-does-not-accept-at-jwt/52965 "2020-11-10T06:45:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skyep29](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/skyep29/32/16304_2.png) [@skyep29](https://community.auth0.com/u/skyep29)\
**Post date:** [November 10, 2020, 6:45am UTC](https://community.auth0.com/t/spring-security-does-not-accept-at-jwt/52965/1 "2020-11-10T06:45:21Z")

</div>

Good day, I’m using spring-security-jwt release 1.1.1. When I try to decode an access token, it fails in the class below, as it expects “JWT”, but gets “at+jwt”. Does anyone know how I can get it to accept the “at+jwt” typ?

```auto
HeaderParameters(Map<String, String> map) {
        this.typ = "JWT";
        String alg = (String)map.get("alg");
        String typ = (String)map.get("typ"); //here my typ is "at+jwt"
        if (typ != null && !"JWT".equalsIgnoreCase(typ)) {
            throw new IllegalArgumentException("typ is not \"JWT\"");
        } else {
            map.remove("alg");
            map.remove("typ");
            this.map = map;
            if (alg == null) {
                throw new IllegalArgumentException("alg is required");
            } else {
                this.alg = alg;
            }
        }
    }

```
