├── completion.hxml ├── docs ├── extra-styles.css ├── favicon.ico ├── triangle-closed.png ├── triangle-opened.png ├── bootstrap │ ├── img │ │ ├── glyphicons-halflings.png │ │ └── glyphicons-halflings-white.png │ └── css │ │ └── bootstrap-select.min.css ├── nav.js ├── highlighter.css ├── highlighter.js ├── haxe │ ├── ds │ │ ├── index.html │ │ └── StringMap.html │ ├── io │ │ ├── BytesData.html │ │ ├── Eof.html │ │ ├── index.html │ │ ├── BytesBuffer.html │ │ └── Bytes.html │ ├── format │ │ ├── index.html │ │ ├── JsonParser.html │ │ └── JsonPrinter.html │ ├── IMap.html │ ├── Int32.html │ ├── Function.html │ ├── crypto │ │ ├── Md5.html │ │ ├── Sha1.html │ │ ├── HashMethod.html │ │ ├── Sha256.html │ │ ├── index.html │ │ ├── Hmac.html │ │ ├── BaseCode.html │ │ └── Base64.html │ ├── FlatEnum.html │ ├── Constructible.html │ ├── Int64.html │ └── index.html ├── neko │ ├── NativeString.html │ ├── NativeArray.html │ ├── index.html │ └── Lib.html ├── jwt │ ├── index.html │ ├── JWTType.html │ ├── JWTAlgorithm.html │ ├── JWTHeader.html │ └── JWTResult.html ├── Class.html ├── EnumValue.html ├── Void.html ├── Enum.html ├── index.html ├── ArrayAccess.html ├── Dynamic.html ├── Bool.html ├── Null.html ├── Iterable.html ├── Float.html ├── Type.html ├── StringBuf.html ├── Int.html ├── haxe-nav.css ├── List.html ├── ValueType.html ├── StringTools.html ├── Reflect.html └── Iterator.html ├── sample ├── sample.hxml └── Main.hx ├── .vscode ├── settings.json └── tasks.json ├── src └── jwt │ ├── JWTType.hx │ ├── JWTAlgorithm.hx │ ├── JWTHeader.hx │ ├── JWTPayloadBase.hx │ └── JWT.hx ├── dox.hxml ├── haxelib.json ├── .gitignore └── README.md /completion.hxml: -------------------------------------------------------------------------------- 1 | -cp src 2 | 3 | jwt.JWT 4 | 5 | --interp -------------------------------------------------------------------------------- /docs/extra-styles.css: -------------------------------------------------------------------------------- 1 | /** to be overridden in sub-themes */ -------------------------------------------------------------------------------- /sample/sample.hxml: -------------------------------------------------------------------------------- 1 | -cp . 2 | -cp ../src 3 | -main Main 4 | --interp -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamaluik/haxe-jwt/HEAD/docs/favicon.ico -------------------------------------------------------------------------------- /docs/triangle-closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamaluik/haxe-jwt/HEAD/docs/triangle-closed.png -------------------------------------------------------------------------------- /docs/triangle-opened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamaluik/haxe-jwt/HEAD/docs/triangle-opened.png -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "haxe.displayConfigurations": [ 3 | ["completion.hxml"] 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /docs/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamaluik/haxe-jwt/HEAD/docs/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hamaluik/haxe-jwt/HEAD/docs/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "command": "haxe", 4 | "args": ["completion.hxml"], 5 | "problemMatcher": "$haxe" 6 | } 7 | -------------------------------------------------------------------------------- /src/jwt/JWTType.hx: -------------------------------------------------------------------------------- 1 | package jwt; 2 | 3 | /** 4 | The type of the token 5 | (it should always be 'JWT'!) 6 | */ 7 | @:enum abstract JWTType(String) { 8 | var JWT = "JWT"; 9 | } -------------------------------------------------------------------------------- /src/jwt/JWTAlgorithm.hx: -------------------------------------------------------------------------------- 1 | package jwt; 2 | 3 | /** 4 | List of signature algorithms that could be used to sign / verify tokens with 5 | */ 6 | @:enum abstract JWTAlgorithm(String) { 7 | /** 8 | HMAC SHA256 9 | */ 10 | var HS256 = "HS256"; 11 | } -------------------------------------------------------------------------------- /src/jwt/JWTHeader.hx: -------------------------------------------------------------------------------- 1 | package jwt; 2 | 3 | /** 4 | Contents of the JWT header 5 | */ 6 | typedef JWTHeader = { 7 | /** 8 | Signature algorithm 9 | */ 10 | var alg:JWTAlgorithm; 11 | 12 | /** 13 | Token type 14 | */ 15 | var typ:JWTType; 16 | }; -------------------------------------------------------------------------------- /dox.hxml: -------------------------------------------------------------------------------- 1 | -cp src 2 | -D docgen 3 | 4 | jwt.JWT 5 | 6 | --each 7 | 8 | --interp 9 | -xml dox/haxe.xml 10 | 11 | --next 12 | -cmd haxelib run dox -i dox -o docs --title "JWT" --toplevel-package "jwt" -D version "1.0.0" -D source-path "https://github.com/FuzzyWuzzie/haxe-jwt/blob/master/src" -------------------------------------------------------------------------------- /haxelib.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jwt", 3 | "classPath": "src", 4 | "url" : "https://github.com/FuzzyWuzzie/haxe-jwt", 5 | "license": "Apache", 6 | "classPath": "src", 7 | "tags": ["cross", "utility", "web"], 8 | "description": "A JSON Web Token library for native Haxe.", 9 | "version": "1.3.0", 10 | "releasenote": "Allow unverified data to be decoded", 11 | "contributors": ["FuzzyWuzzie"], 12 | "dependencies": { } 13 | } 14 | -------------------------------------------------------------------------------- /src/jwt/JWTPayloadBase.hx: -------------------------------------------------------------------------------- 1 | package jwt; 2 | 3 | /** 4 | Base anonymous structure to optionally extend from 5 | @see 6 | @see 7 | */ 8 | typedef JWTPayloadBase = { 9 | /** 10 | Issuer 11 | */ 12 | @:optional var iss:String; 13 | 14 | /** 15 | Expiration time 16 | */ 17 | @:optional var exp:Int; 18 | 19 | /** 20 | Subject 21 | */ 22 | @:optional var sub:String; 23 | 24 | /** 25 | Audience 26 | */ 27 | @:optional var aud:String; 28 | 29 | /** 30 | Issued at time 31 | */ 32 | @:optional var iat:Int; 33 | }; -------------------------------------------------------------------------------- /docs/nav.js: -------------------------------------------------------------------------------- 1 | var navContent=''; -------------------------------------------------------------------------------- /docs/highlighter.css: -------------------------------------------------------------------------------- 1 | /** 2 | Code Highlighting 3 | **/ 4 | html pre, html pre code { 5 | font-family: consolas, monospace; 6 | white-space: pre; 7 | overflow-x: auto; 8 | } 9 | code { 10 | color: #333; 11 | } 12 | code a { 13 | color: #08c; 14 | } 15 | pre { 16 | color: #333; 17 | margin: 15px 0; 18 | padding: 0.5em; 19 | } 20 | pre .type { 21 | color: #0086b3; 22 | } 23 | pre .kwd { 24 | color: #00a; 25 | } 26 | pre .val { 27 | color: #44a; 28 | } 29 | pre .str, div.pre .str, pre .str .kwd, pre .str .val, pre .str .type { 30 | color: #a00; 31 | } 32 | pre .cmt { 33 | color: #008800; 34 | color: #998; 35 | font-style: italic; 36 | } 37 | /* Make sure keywords inside comments are not highlighted*/ 38 | pre .cmt .kwd, pre .cmt .str, pre .cmt .val, pre .cmt .type { 39 | color: #998; 40 | } 41 | .last-modified { 42 | color:#999; 43 | } 44 | .semantic { 45 | display:none; 46 | } 47 | -------------------------------------------------------------------------------- /sample/Main.hx: -------------------------------------------------------------------------------- 1 | import Sys; 2 | import jwt.JWT; 3 | 4 | typedef TPayload = { 5 | var adm:Bool; 6 | }; 7 | 8 | class Main { 9 | public static function main():Void { 10 | var payload:TPayload = { 11 | adm: true 12 | }; 13 | 14 | var token:String = JWT.sign(payload, "derp"); 15 | Sys.println('Generated valid token: ${token}'); 16 | 17 | var fakeToken:String = JWT.sign({ adm: true }, 'password1'); 18 | Sys.println('Testing token: ${fakeToken}'); 19 | var test1:JWTResult = JWT.verify(fakeToken, 'derp'); 20 | switch(test1) { 21 | case Valid(p): Sys.println(" token is valid! is admin: " + p.adm); 22 | case Invalid: Sys.println(" invalid token!"); 23 | } 24 | 25 | Sys.println('Testing valid token: ${token}'); 26 | var test2:JWTResult = JWT.verify(token, 'derp'); 27 | switch(test2) { 28 | case Valid(p): Sys.println(" token is valid! is admin: " + p.adm); 29 | case Invalid: Sys.println(" invalid token!"); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dox/ 2 | *.zip 3 | 4 | # Created by https://www.gitignore.io/api/osx,linux,windows,visualstudiocode 5 | 6 | ### Linux ### 7 | *~ 8 | 9 | # temporary files which can be created if a process still has a handle open of a deleted file 10 | .fuse_hidden* 11 | 12 | # KDE directory preferences 13 | .directory 14 | 15 | # Linux trash folder which might appear on any partition or disk 16 | .Trash-* 17 | 18 | # .nfs files are created when an open file is removed but is still being accessed 19 | .nfs* 20 | 21 | ### OSX ### 22 | *.DS_Store 23 | .AppleDouble 24 | .LSOverride 25 | 26 | # Icon must end with two \r 27 | Icon 28 | 29 | # Thumbnails 30 | ._* 31 | 32 | # Files that might appear in the root of a volume 33 | .DocumentRevisions-V100 34 | .fseventsd 35 | .Spotlight-V100 36 | .TemporaryItems 37 | .Trashes 38 | .VolumeIcon.icns 39 | .com.apple.timemachine.donotpresent 40 | 41 | # Directories potentially created on remote AFP share 42 | .AppleDB 43 | .AppleDesktop 44 | Network Trash Folder 45 | Temporary Items 46 | .apdisk 47 | 48 | ### VisualStudioCode ### 49 | .vscode/* 50 | !.vscode/settings.json 51 | !.vscode/tasks.json 52 | !.vscode/launch.json 53 | !.vscode/extensions.json 54 | 55 | ### Windows ### 56 | # Windows thumbnail cache files 57 | Thumbs.db 58 | ehthumbs.db 59 | ehthumbs_vista.db 60 | 61 | # Folder config file 62 | Desktop.ini 63 | 64 | # Recycle Bin used on file shares 65 | $RECYCLE.BIN/ 66 | 67 | # Windows Installer files 68 | *.cab 69 | *.msi 70 | *.msm 71 | *.msp 72 | 73 | # Windows shortcuts 74 | *.lnk 75 | 76 | # End of https://www.gitignore.io/api/osx,linux,windows,visualstudiocode 77 | -------------------------------------------------------------------------------- /docs/highlighter.js: -------------------------------------------------------------------------------- 1 | // highlighter adapted/modified from code.haxe.org 2 | (function (console) { "use strict"; 3 | var EReg = function(r,opt) { 4 | opt = opt.split("u").join(""); 5 | this.r = new RegExp(r,opt); 6 | }; 7 | EReg.prototype = { 8 | replace: function(s,by) { 9 | return s.replace(this.r,by); 10 | } 11 | }; 12 | var Highlighter = function() { }; 13 | Highlighter.main = function() { 14 | var _g = 0; 15 | var _g1 = window.document.body.querySelectorAll("pre code"); 16 | while(_g < _g1.length) { 17 | var el = _g1[_g]; 18 | ++_g; 19 | if(!Highlighter.hasClass(el,"highlighted")) { 20 | el.innerHTML = Highlighter.syntaxHighlight(el.innerHTML); 21 | el.className += " highlighted"; 22 | } 23 | } 24 | }; 25 | Highlighter.hasClass = function(el,className) { 26 | return el.className.indexOf(className) != -1; 27 | }; 28 | Highlighter.syntaxHighlight = function(html) { 29 | var kwds = ["abstract","trace","break","case","cast","class","continue","default","do","dynamic","else","enum","extends","extern","for","function","if","implements","import","in","inline","interface","macro","new","override","package","private","public","return","static","switch","throw","try","typedef","untyped","using","var","while"]; 30 | var kwds1 = new EReg("\\b(" + kwds.join("|") + ")\\b","g"); 31 | var vals = ["null","true","false","this"]; 32 | var vals1 = new EReg("\\b(" + vals.join("|") + ")\\b","g"); 33 | var types = new EReg("\\b([A-Z][a-zA-Z0-9]*)\\b","g"); 34 | html = kwds1.replace(html,"$1"); 35 | html = vals1.replace(html,"$1"); 36 | html = types.replace(html,"$1"); 37 | html = new EReg("(\"[^\"]*\")","g").replace(html,"$1"); 38 | html = new EReg("(//.+?)(\n|$)","g").replace(html,"$1$2"); 39 | html = new EReg("(/\\*\\*?(.|\n)+?\\*?\\*/)","g").replace(html,"$1"); 40 | return html; 41 | }; 42 | Highlighter.main(); 43 | })(typeof console != "undefined" ? console : {log:function(){}}); 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # haxe-jwt 2 | 3 | [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg?style=flat-square)](https://raw.githubusercontent.com/FuzzyWuzzie/haxe-jwt/master/LICENSE) 4 | 5 | A [JSON Web Token](https://jwt.io/#debugger) library for native [Haxe](http://haxe.org/). 6 | 7 | API docs are available here: [https://fuzzywuzzie.github.io/haxe-jwt/](https://fuzzywuzzie.github.io/haxe-jwt/). 8 | 9 | ## Features 10 | 11 | * Signing (generating) tokens 12 | + Limited to HS256 algorithm for now 13 | * Verifying (& decoding) tokens 14 | + Limited to HS256 algorithm for now 15 | + Does not check any public claims (exp, iss, sub, etc) yet 16 | 17 | ## Usage 18 | 19 | The library exposes two main functionalities: _signing_ tokens and _verifying_ tokens. 20 | 21 | ### Signing Tokens 22 | 23 | ```haxe 24 | import jwt.JWT; 25 | 26 | // ... 27 | 28 | var token:String = JWT.sign({ adm: true }, "my super secret secret"); 29 | ``` 30 | 31 | 32 | ### Verifying Tokens 33 | 34 | ```haxe 35 | import jwt.JWT; 36 | 37 | typedef TPayload = { 38 | > jwt.JWTPayloadBase, 39 | var adm:Bool; 40 | } 41 | 42 | // ... 43 | 44 | var result:JWTResult = JWT.verify(token, "my super secret secret"); 45 | switch(result) { 46 | case Valid(payload): { 47 | trace(payload); 48 | } 49 | 50 | case Invalid: throw 'The token was invalid, you dummy!'; 51 | } 52 | 53 | ``` 54 | 55 | ## Change Log 56 | All notable changes to this project will be documented in this file. 57 | 58 | The format is based on [Keep a Changelog](http://keepachangelog.com/) 59 | and this project adheres to [Semantic Versioning](http://semver.org/). 60 | 61 | ### 1.1.0 62 | #### Added 63 | - A `replacer` parameter to `JWT.sign`, allowing custom replacers for JSON encoding (through `haxe.Json.encode`). 64 | 65 | #### Fixed 66 | - Actually fixed `haxelib.json` `classpath` :sweat_smile: 67 | 68 | ### 1.0.1 69 | #### Changed 70 | - Attempted to fix `haxelib.json` `classpath` so library can _actually_ be used. 71 | 72 | ### 1.0.0 73 | #### Added 74 | - HMACSHA256 token generation & signing 75 | - HMACSHA256 token verification & decoding 76 | -------------------------------------------------------------------------------- /docs/haxe/ds/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.ds - jwt

haxe.ds

..
StringMap

StringMap allows mapping of String keys to arbitrary values.

-------------------------------------------------------------------------------- /docs/neko/NativeString.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | neko.NativeString - jwt

-------------------------------------------------------------------------------- /docs/neko/NativeArray.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | neko.NativeArray - jwt

-------------------------------------------------------------------------------- /docs/haxe/io/BytesData.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.io.BytesData - jwt

-------------------------------------------------------------------------------- /docs/haxe/format/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.format - jwt

haxe.format

..
JsonParser

An implementation of JSON parser in Haxe.

JsonPrinter

An implementation of JSON printer in Haxe.

-------------------------------------------------------------------------------- /docs/haxe/io/Eof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.io.Eof - jwt

This exception is raised when reading while data is no longer available in the haxe.io.Input.

-------------------------------------------------------------------------------- /docs/neko/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | neko - jwt

neko

..
Lib

Platform-specific Neko Library. Provides some platform-specific functions 10 | for the Neko target, such as conversion from Haxe types to native types 11 | and vice-versa.

NativeArray

NativeString

-------------------------------------------------------------------------------- /docs/haxe/IMap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.IMap - jwt

-------------------------------------------------------------------------------- /docs/haxe/io/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.io - jwt

haxe.io

..
Bytes

BytesBuffer

BytesData

Eof

This exception is raised when reading while data is no longer available in the haxe.io.Input.

-------------------------------------------------------------------------------- /docs/haxe/Int32.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.Int32 - jwt

Int32 provides a 32-bit integer with consistent overflow behavior across 11 | all platforms.

-------------------------------------------------------------------------------- /docs/jwt/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jwt - jwt

jwt

..
JWT

JWTAlgorithm

JWTHeader

JWTResult

The result of a call to JWT.verify. 10 | * If the token is valid and the signatures match, it contains the payload.

JWTType

-------------------------------------------------------------------------------- /docs/haxe/format/JsonParser.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.format.JsonParser - jwt

An implementation of JSON parser in Haxe.

10 |

This class is used by haxe.Json when native JSON implementation 11 | is not available.

See:

-------------------------------------------------------------------------------- /docs/Class.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Class - jwt

An abstract type that represents a Class.

10 |

See Type for the Haxe Reflection API.

See:

-------------------------------------------------------------------------------- /docs/haxe/Function.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.Function - jwt

This type unifies with any function type.

10 |

It is intended to be used as a type parameter constraint. If used as a real 11 | type, the underlying type will be Dynamic.

-------------------------------------------------------------------------------- /docs/haxe/crypto/Md5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.crypto.Md5 - jwt

Creates a MD5 of a String.

Static methods

staticmake (b:Bytes):Bytes

-------------------------------------------------------------------------------- /docs/EnumValue.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EnumValue - jwt

An abstract type that represents any enum value. 11 | See Type for the Haxe Reflection API.

See:

-------------------------------------------------------------------------------- /docs/haxe/crypto/Sha1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.crypto.Sha1 - jwt

Creates a Sha1 of a String.

Static methods

staticmake (b:Bytes):Bytes

-------------------------------------------------------------------------------- /docs/Void.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Void - jwt

The standard Void type. Only null values can be of the type Void.

See:

-------------------------------------------------------------------------------- /docs/Enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enum - jwt

An abstract type that represents an Enum type.

10 |

The corresponding enum instance type is EnumValue.

11 |

See Type for the Haxe Reflection API.

See:

-------------------------------------------------------------------------------- /docs/haxe/FlatEnum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.FlatEnum - jwt

This type unifies with an enum instance if all constructors of the enum 11 | require no arguments.

12 |

It is intended to be used as a type parameter constraint. If used as a real 13 | type, the underlying type will be Dynamic.

-------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | top level - JWT

top level version 1.0.0

JWT

All JWT functionality is implemented here (namely signing and verifying tokens)

JWTAlgorithm

List of signature algorithms that could be used to sign / verify tokens with

JWTHeader

Contents of the JWT header

JWTResult

The result of a call to JWT.verify. 10 | If the token is valid and the signatures match, it contains the payload.

JWTType

The type of the token 11 | (it should always be 'JWT'!)

-------------------------------------------------------------------------------- /docs/jwt/JWTType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jwt.JWTType - JWT

The type of the token 11 | (it should always be 'JWT'!)

Variables

inlineread onlyJWT:JWTType

-------------------------------------------------------------------------------- /docs/jwt/JWTAlgorithm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jwt.JWTAlgorithm - JWT

List of signature algorithms that could be used to sign / verify tokens with

Variables

inlineread onlyHS256:JWTAlgorithm

HMAC SHA256

-------------------------------------------------------------------------------- /docs/haxe/crypto/HashMethod.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.crypto.HashMethod - jwt

Hash methods for Hmac calculation.

Values

-------------------------------------------------------------------------------- /docs/jwt/JWTHeader.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jwt.JWTHeader - JWT

Contents of the JWT header

Properties

alg:JWTAlgorithm

Signature algorithm

typ:JWTType

Token type

-------------------------------------------------------------------------------- /docs/haxe/crypto/Sha256.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.crypto.Sha256 - jwt

Creates a Sha256 of a String.

Constructor

new ()

Static methods

staticmake (b:Bytes):Bytes

-------------------------------------------------------------------------------- /docs/ArrayAccess.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ArrayAccess - jwt

ArrayAccess is used to indicate a class that can be accessed using brackets. 11 | The type parameter represents the type of the elements stored.

12 |

This interface should be used for externs only. Haxe does not support custom 13 | array access on classes. However, array access can be implemented for 14 | abstract types.

See:

-------------------------------------------------------------------------------- /docs/Dynamic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dynamic - jwt

Dynamic is a special type which is compatible with all other types.

10 |

Use of Dynamic should be minimized as it prevents several compiler 11 | checks and optimizations. See Any type for a safer alternative for 12 | representing values of any type.

See:

-------------------------------------------------------------------------------- /docs/Bool.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bool - jwt

The standard Boolean type, which can either be true or false.

10 |

On static targets, null cannot be assigned to Bool. If this is necessary, 11 | Null<Bool> can be used instead.

See:

-------------------------------------------------------------------------------- /docs/jwt/JWTResult.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jwt.JWTResult - JWT

The result of a call to JWT.verify. 11 | If the token is valid and the signatures match, it contains the payload.

Values

Valid(payload:T)

The token signature is valid, included is the payload

Invalid

The token was malformed or the signature was invalid

-------------------------------------------------------------------------------- /docs/Null.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Null - jwt

Null can be useful in two cases. In order to document some methods 13 | that accept or can return a null value, or for the Flash compiler and AS3 14 | generator to distinguish between base values that can be null and others that 15 | can't.

See:

-------------------------------------------------------------------------------- /docs/Iterable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Iterable - jwt

An Iterable is a data structure which has an iterator() method. 11 | See Lambda for generic functions on iterable structures.

See:

Properties

-------------------------------------------------------------------------------- /docs/haxe/Constructible.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.Constructible - jwt

This type unifies with any instance of classes that have a constructor 11 | which

12 |
* is public and
13 | * unifies with the type used for type parameter `T`.
14 | 
15 |

If a type parameter A is assigned to a type parameter B which is constrained 16 | to Constructible<T>, A must be explicitly constrained to 17 | Constructible<T> as well.

18 |

It is intended to be used as a type parameter constraint. If used as a real 19 | type, the underlying type will be Dynamic.

-------------------------------------------------------------------------------- /docs/haxe/crypto/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.crypto - jwt

haxe.crypto

..
Base64

Allows to encode/decode String and bytes using Base64 encoding.

BaseCode

Allows to encode/decode String and bytes using a power of two base dictionary.

HashMethod

Hash methods for Hmac calculation.

Hmac

Calculates a Hmac of the given Bytes using a HashMethod.

Md5

Creates a MD5 of a String.

Sha1

Creates a Sha1 of a String.

Sha256

Creates a Sha256 of a String.

-------------------------------------------------------------------------------- /docs/haxe/crypto/Hmac.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.crypto.Hmac - jwt

Calculates a Hmac of the given Bytes using a HashMethod.

Constructor

new (hashMethod:HashMethod)

Methods

make (key:Bytes, msg:Bytes):Bytes

-------------------------------------------------------------------------------- /docs/haxe/io/BytesBuffer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.io.BytesBuffer - jwt

Constructor

new ()

Variables

read onlywrite onlylength:Int

The length of the buffer in bytes.

Methods

getBytes ():Bytes

Returns either a copy or a reference of the current bytes. 10 | Once called, the buffer can no longer be used.

-------------------------------------------------------------------------------- /docs/haxe/ds/StringMap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.ds.StringMap - jwt

StringMap allows mapping of String keys to arbitrary values.

10 |

See Map for documentation details.

See:

Methods

keys ():Iterator<String>

See Map.keys

-------------------------------------------------------------------------------- /docs/neko/Lib.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | neko.Lib - jwt

Platform-specific Neko Library. Provides some platform-specific functions 12 | for the Neko target, such as conversion from Haxe types to native types 13 | and vice-versa.

Static methods

staticload (lib:String, prim:String, nargs:Int):Dynamic

Load and return a Neko primitive from a NDLL library.

-------------------------------------------------------------------------------- /docs/Float.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Float - jwt

The standard Float type, this is a double-precision IEEE 64bit float.

10 |

On static targets, null cannot be assigned to Float. If this is necessary, 11 | Null<Float> can be used instead.

12 |

Std.int converts a Float to an Int, rounded towards 0. 13 | Std.parseFloat converts a String to a Float.

See:

-------------------------------------------------------------------------------- /docs/Type.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Type - jwt

The Haxe Reflection API allows retrieval of type information at runtime.

10 |

This class complements the more lightweight Reflect class, with a focus on 11 | class and enum instances.

See:

Static methods

statictypeof (v:Dynamic):ValueType

Returns the runtime type of value v.

12 |

The result corresponds to the type v has at runtime, which may vary 13 | per platform. Assumptions regarding this should be minimized to avoid 14 | surprises.

-------------------------------------------------------------------------------- /docs/StringBuf.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | StringBuf - jwt

A String buffer is an efficient way to build a big string by appending small 11 | elements together.

12 |

Its cross-platform implementation uses String concatenation internally, but 13 | StringBuf may be optimized for different targets.

14 |

Unlike String, an instance of StringBuf is not immutable in the sense that 15 | it can be passed as argument to functions which modify it by appending more 16 | values. However, the internal buffer cannot be modified.

Constructor

new ()

Creates a new StringBuf instance.

17 |

This may involve initialization of the internal buffer.

Variables

read onlywrite onlylength:Int

The length of this StringBuf in characters.

-------------------------------------------------------------------------------- /docs/haxe/Int64.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.Int64 - jwt

A cross-platform signed 64-bit integer. 11 | Int64 instances can be created from two 32-bit words using Int64.make().

Variables

read onlyhigh:Int32

read onlylow:Int32

-------------------------------------------------------------------------------- /docs/haxe/crypto/BaseCode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.crypto.BaseCode - jwt

Allows to encode/decode String and bytes using a power of two base dictionary.

Constructor

new (base:Bytes)

Methods

-------------------------------------------------------------------------------- /docs/Int.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Int - jwt

The standard Int type. Its precision depends on the platform.

10 |

On static targets, null cannot be assigned to Int. If this is necessary, 11 | Null<Int> can be used instead.

12 |

Std.int converts a Float to an Int, rounded towards 0. 13 | Std.parseInt converts a String to an Int.

See:

-------------------------------------------------------------------------------- /docs/haxe-nav.css: -------------------------------------------------------------------------------- 1 | nav.nav { 2 | font-family: "Open Sans", sans-serif; 3 | font-size: 16px; 4 | margin:0; 5 | } 6 | 7 | nav .fa { 8 | color:#777; 9 | margin-right:5px; 10 | } 11 | 12 | body nav * {line-height:20px;} 13 | 14 | nav .navbar-inverse .navbar-inner { 15 | background:#13110f; 16 | border:0; 17 | } 18 | 19 | nav .navbar .nav { 20 | margin:0; 21 | } 22 | 23 | nav .dropdown-menu { 24 | background:#2c2722; 25 | font-size: 14px; 26 | border-radius:0px 0px 2px 2px; 27 | padding:10px 0px; 28 | border:1px solid #2c2722; 29 | margin-top:-1px; 30 | } 31 | 32 | nav .navbar .nav>li>a { 33 | padding: 14px 12px 15px 12px; 34 | color:#ccc; 35 | } 36 | 37 | nav .dropdown-menu li a { 38 | color: #b8b5b5; 39 | padding:3px 15px; 40 | } 41 | nav .divider { 42 | background-color:transparent; 43 | border-right:1px solid #39332d; 44 | margin:5px 20px 5px 10px; 45 | height:39px; 46 | } 47 | 48 | nav .dropdown-menu .divider { 49 | background-color:transparent; 50 | border:0; 51 | border-bottom:1px solid #39332d; 52 | margin:5px 0; 53 | } 54 | 55 | nav .navbar-inverse .nav .active>a, nav .navbar-inverse .nav .active>a:hover, nav .navbar-inverse .nav .active>a:focus, nav .navbar-inverse .nav li.dropdown.open>.dropdown-toggle, nav .navbar-inverse .nav li.dropdown.active>.dropdown-toggle, nav .navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle { 56 | color: #fff; 57 | background-color:transparent; 58 | background-image:none; 59 | } 60 | 61 | nav .navbar-inverse .nav .active>a:hover { 62 | background:#39332d; 63 | } 64 | 65 | nav .dropdown-menu>.active>a, nav .dropdown-menu>.active>a:hover, nav .dropdown-menu>.active>a:focus { 66 | font-weight:bold; 67 | color: #fff; 68 | background-image:none; 69 | background:#39332d; 70 | } 71 | 72 | nav .dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus, nav .dropdown-submenu:hover>a, nav .dropdown-submenu:focus>a { 73 | background:#39332d; 74 | } 75 | 76 | nav .navbar .nav>li>.dropdown-menu:after { 77 | border-bottom-color:#2c2722; 78 | } 79 | 80 | /** MEDIA Q **/ 81 | 82 | @media (max-width: 979px) 83 | { 84 | nav .navbar-fixed-top .navbar-inner, nav .navbar-fixed-bottom .navbar-inner { 85 | padding: 0px; 86 | } 87 | nav .navbar-fixed-top { 88 | margin-bottom: 0; 89 | } 90 | } 91 | 92 | /** SUB BRAND LOGOS **/ 93 | 94 | .navbar .brand.haxe-logo { padding-right:0; margin: 3px 0 0 0px; } 95 | .navbar .brand.haxe-logo:hover { opacity:.9; } 96 | 97 | .navbar .brand.haxe-logo:after { 98 | content:" "; 99 | position:absolute; 100 | /* create arrow */ 101 | width: 0; 102 | height: 0; 103 | border-top: 22px solid transparent; 104 | border-bottom: 22px solid transparent; 105 | border-left: 7px solid #13110f; /* same color as nav bar */ 106 | top:0; 107 | } 108 | .navbar .brand.sub { 109 | background: #39332d; /* Old browsers */ 110 | background: -moz-linear-gradient(top, #39332d 50%, #2c2722 51%); /* FF3.6+ */ 111 | background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,#39332d), color-stop(51%,#2c2722)); /* Chrome,Safari4+ */ 112 | background: -webkit-linear-gradient(top, #39332d 50%,#2c2722 51%); /* Chrome10+,Safari5.1+ */ 113 | background: -o-linear-gradient(top, #39332d 50%,#2c2722 51%); /* Opera 11.10+ */ 114 | background: -ms-linear-gradient(top, #39332d 50%,#2c2722 51%); /* IE10+ */ 115 | background: linear-gradient(to bottom, #39332d 50%,#2c2722 51%); /* W3C */ 116 | padding:14px 20px 13px 20px; 117 | margin:0 10px 0 0; 118 | font:bold 18px "arial black", "open sans"; 119 | line-height:22px; 120 | color:rgb(255,255,255); 121 | } 122 | .navbar .brand.sub:hover { 123 | color:rgb(230,230,230); 124 | background: #2c2722; /* Old browsers */ 125 | } 126 | 127 | .navbar .brand.sub:before { 128 | content:".."; /* two dots */ 129 | position:absolute; 130 | margin-left:-33px; 131 | margin-top:-28px; 132 | line-height:0px; 133 | font:bold 40px "Open Sans", sans-serif; 134 | letter-spacing:0px; 135 | color:#fff200; 136 | } 137 | 138 | /** SUB BRAND COLORS **/ 139 | 140 | .navbar .brand.sub.try:before { 141 | color:#f89c0e; 142 | } 143 | 144 | .navbar .brand.sub.api:before { 145 | color:#eedc16; 146 | } 147 | 148 | .navbar .brand.sub.lib:before { 149 | color:#f1471d; 150 | } 151 | .navbar .brand.sub.ide:before { 152 | color:#f89c0e; 153 | } 154 | -------------------------------------------------------------------------------- /docs/List.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | List - jwt

A linked-list of elements. The list is composed of element container objects 12 | that are chained together. It is optimized so that adding or removing an 13 | element does not imply copying the whole list content every time.

See:

Constructor

new ()

Creates a new empty list.

Variables

read onlylength:Int

The length of this List.

Methods

push (item:T):Void

Adds element item at the beginning of this List.

14 |

this.length increases by 1.

-------------------------------------------------------------------------------- /docs/ValueType.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ValueType - jwt
-------------------------------------------------------------------------------- /docs/StringTools.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | StringTools - jwt

This class provides advanced methods on Strings. It is ideally used with 12 | using StringTools and then acts as an extension 13 | to the String class.

14 |

If the first argument to any of the methods is null, the result is 15 | unspecified.

Static methods

staticlpad (s:String, c:String, l:Int):String

Concatenates c to s until s.length is at least l.

16 |

If c is the empty String "" or if l does not exceed s.length, 17 | s is returned unchanged.

18 |

If c.length is 1, the resulting String length is exactly l.

19 |

Otherwise the length may exceed l.

20 |

If c is null, the result is unspecified.

-------------------------------------------------------------------------------- /docs/Reflect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Reflect - jwt

The Reflect API is a way to manipulate values dynamically through an 11 | abstract interface in an untyped manner. Use with care.

See:

Static methods

staticfields (o:Dynamic):Array<String>

Returns the fields of structure o.

12 |

This method is only guaranteed to work on anonymous structures. Refer to 13 | Type.getInstanceFields for a function supporting class instances.

14 |

If o is null, the result is unspecified.

staticisFunction (f:Dynamic):Bool

Returns true if f is a function, false otherwise.

15 |

If f is null, the result is false.

-------------------------------------------------------------------------------- /docs/Iterator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Iterator - jwt

An Iterator is a structure that permits iteration over elements of type T.

10 |

Any class with matching hasNext() and next() fields is considered an Iterator 11 | and can then be used e.g. in for-loops. This makes it easy to implement 12 | custom iterators.

See:

Properties

hasNext ():Bool

Returns false if the iteration is complete, true otherwise.

13 |

Usually iteration is considered to be complete if all elements of the 14 | underlying data structure were handled through calls to next(). However, 15 | in custom iterators any logic may be used to determine the completion 16 | state.

next ():T

Returns the current item of the Iterator and advances to the next one.

17 |

This method is not required to check hasNext() first. A call to this 18 | method while hasNext() is false yields unspecified behavior.

19 |

On the other hand, iterators should not require a call to hasNext() 20 | before the first call to next() if an element is available.

-------------------------------------------------------------------------------- /docs/haxe/format/JsonPrinter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.format.JsonPrinter - jwt

An implementation of JSON printer in Haxe.

10 |

This class is used by haxe.Json when native JSON implementation 11 | is not available.

See:

Static methods

staticprint (o:Dynamic, ?replacer:Dynamic ‑> Dynamic ‑> Dynamic, ?space:String):String

Encodes o's value and returns the resulting JSON string.

12 |

If replacer is given and is not null, it is used to retrieve 13 | actual object to be encoded. The replacer function takes two parameters, 14 | the key and the value being encoded. Initial key value is an empty string.

15 |

If space is given and is not null, the result will be pretty-printed. 16 | Successive levels will be indented by this string.

-------------------------------------------------------------------------------- /docs/haxe/crypto/Base64.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.crypto.Base64 - jwt

Allows to encode/decode String and bytes using Base64 encoding.

Static variables

staticread onlyBYTES:Bytes

staticread onlyCHARS:String

Static methods

staticdecode (str:String, ?complement:Bool):Bytes

staticencode (bytes:Bytes, ?complement:Bool):String

-------------------------------------------------------------------------------- /docs/haxe/io/Bytes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe.io.Bytes - jwt

Variables

read onlylength:Int

Methods

Static methods

staticalloc (length:Int):Bytes

-------------------------------------------------------------------------------- /src/jwt/JWT.hx: -------------------------------------------------------------------------------- 1 | package jwt; 2 | 3 | import haxe.Json; 4 | import haxe.crypto.Base64; 5 | import haxe.crypto.Hmac; 6 | import haxe.io.Bytes; 7 | 8 | using StringTools; 9 | 10 | /** 11 | The result of a call to JWT.verify. 12 | If the token is valid and the signatures match, it contains the payload. 13 | */ 14 | enum JWTResult { 15 | /** 16 | The token signature is valid, included is the payload 17 | */ 18 | Valid(payload:T); 19 | 20 | /** 21 | The signature was invalid 22 | */ 23 | Invalid(payload:T); 24 | 25 | /** 26 | * The token was malformed 27 | */ 28 | Malformed; 29 | } 30 | 31 | /** 32 | All JWT functionality is implemented here (namely signing and verifying tokens) 33 | */ 34 | class JWT { 35 | private function new(){} 36 | 37 | private static function base64url_encode(b:Bytes):String { 38 | var b64:String = Base64.encode(b); 39 | return b64.replace('+', '-').replace('/', '_').replace('=', ''); 40 | } 41 | 42 | private static function base64url_decode(s:String):Bytes { 43 | var s64 = s.replace('-', '+').replace('_', '/'); 44 | s64 += switch(s64.length % 4) { 45 | case 0: ''; 46 | case 1: '==='; 47 | case 2: '=='; 48 | case 3: '='; 49 | case _: throw 'Illegal base64url string!'; 50 | } 51 | return Base64.decode(s64); 52 | } 53 | 54 | private static function signature(alg:JWTAlgorithm, body:String, secret:String):Bytes { 55 | if(alg != JWTAlgorithm.HS256) throw "HS256 is the only supported algorithm for now!"; 56 | 57 | var hmac:Hmac = new Hmac(HashMethod.SHA256); 58 | var sb:Bytes = hmac.make(Bytes.ofString(secret), Bytes.ofString(body)); 59 | return sb; 60 | } 61 | 62 | /** 63 | Creates a signed JWT 64 | @param header - header information. If null, will default to HS256 encryption 65 | @param payload - The data to include 66 | @param replacer - If `replacer` is given and is not null, it is used to retrieve the 67 | actual payload to be encoded. The `replacer` function takes two parameters, 68 | the key and the value being encoded. Initial key value is an empty string. 69 | @see 70 | @param secret - The secret to generate the signature with 71 | @return String 72 | */ 73 | public static function sign(payload:Dynamic, secret:String, ?replacer:Dynamic->Dynamic->Dynamic, ?header:JWTHeader):String { 74 | if(header == null) { 75 | header = { 76 | alg: JWTAlgorithm.HS256, 77 | typ: JWTType.JWT 78 | }; 79 | } 80 | 81 | // for now 82 | header.alg = JWTAlgorithm.HS256; 83 | 84 | var h:String = Json.stringify(header); 85 | var p:String = Json.stringify(payload, replacer); 86 | var hb64:String = base64url_encode(Bytes.ofString(h)); 87 | var pb64:String = base64url_encode(Bytes.ofString(p)); 88 | var sb:Bytes = switch(header.alg) { 89 | case JWTAlgorithm.HS256: signature(header.alg, hb64 + "." + pb64, secret); 90 | default: throw 'The ${cast(header.alg)} algorithm isn\'t supported yet!'; 91 | } 92 | var s:String = base64url_encode(sb); 93 | 94 | return hb64 + "." + pb64 + "." + s; 95 | } 96 | 97 | // TODO: add @:generic when https://github.com/HaxeFoundation/haxe/issues/3697 is sorted 98 | 99 | /** 100 | Verifies a JWT and returns the payload if successful 101 | @param jwt - the token to examine 102 | @param secret - the secret to compare it with 103 | @return JWTResult 104 | */ 105 | public static function verify(jwt:String, secret:String):JWTResult { 106 | var parts:Array = jwt.split("."); 107 | if(parts.length != 3) return JWTResult.Malformed; 108 | 109 | var h:String = base64url_decode(parts[0]).toString(); 110 | var header:JWTHeader = cast(Json.parse(h)); 111 | if(header.alg != JWTAlgorithm.HS256) throw 'The ${cast(header.alg)} algorithm isn\'t supported yet!'; 112 | 113 | var p:String = base64url_decode(parts[1]).toString(); 114 | 115 | // verify the signatures match! 116 | var sb:Bytes = base64url_decode(parts[2]); 117 | var testSig:Bytes = signature(header.alg, parts[0] + "." + parts[1], secret); 118 | if(sb.compare(testSig) != 0) return JWTResult.Invalid(Json.parse(p)); 119 | 120 | // TODO: validate public claims (iss, sub, exp, etc) 121 | 122 | return JWTResult.Valid(Json.parse(p)); 123 | } 124 | 125 | /** 126 | Extracts the payload from a JWT, throwing an exception if it is malformed 127 | @param jwt - The token to extract from 128 | @return T 129 | */ 130 | public static function extract(jwt:String):T { 131 | var parts:Array = jwt.split("."); 132 | if(parts.length != 3) throw 'Malformed JWT!'; 133 | return Json.parse(base64url_decode(parts[1]).toString()); 134 | } 135 | } -------------------------------------------------------------------------------- /docs/haxe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | haxe - jwt

haxe

..
crypto
ds
format
io
Constructible

This type unifies with any instance of classes that have a constructor 10 | which

EnumTools

This class provides advanced methods on enums. It is ideally used with 11 | using EnumTools and then acts as an 12 | extension to the 13 | enum types.

EnumValueTools

This class provides advanced methods on enum values. It is ideally used with 14 | using EnumValueTools and then acts as an 15 | extension to the 16 | EnumValue types.

FlatEnum

This type unifies with an enum instance if all constructors of the enum 17 | require no arguments.

Function

This type unifies with any function type.

IMap

Int32

Int32 provides a 32-bit integer with consistent overflow behavior across 18 | all platforms.

Int64

A cross-platform signed 64-bit integer. 19 | Int64 instances can be created from two 32-bit words using Int64.make().

Utf8

Since not all platforms guarantee that String always uses UTF-8 encoding, you 20 | can use this cross-platform API to perform operations on such strings.

-------------------------------------------------------------------------------- /docs/bootstrap/css/bootstrap-select.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/) 3 | * 4 | * Copyright 2013-2014 bootstrap-select 5 | * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) 6 | */.bootstrap-select{width:220px \0}.bootstrap-select>.btn{width:100%;padding-right:25px}.error .bootstrap-select .btn{border:1px solid #b94a48}.control-group.error .bootstrap-select .dropdown-toggle{border-color:#b94a48}.bootstrap-select.fit-width{width:auto!important}.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn){width:220px}.bootstrap-select .btn:focus{outline:thin dotted #333!important;outline:5px auto -webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:none}.bootstrap-select.form-control:not([class*=col-]){width:100%}.bootstrap-select.btn-group:not(.input-group-btn),.bootstrap-select.btn-group[class*=col-]{float:none;display:inline-block;margin-left:0}.bootstrap-select.btn-group.dropdown-menu-right,.bootstrap-select.btn-group[class*=col-].dropdown-menu-right,.row-fluid .bootstrap-select.btn-group[class*=col-].dropdown-menu-right{float:right}.form-search .bootstrap-select.btn-group,.form-inline .bootstrap-select.btn-group,.form-horizontal .bootstrap-select.btn-group,.form-group .bootstrap-select.btn-group{margin-bottom:0}.form-group-lg .bootstrap-select.btn-group.form-control,.form-group-sm .bootstrap-select.btn-group.form-control{padding:0}.form-inline .bootstrap-select.btn-group .form-control{width:100%}.input-append .bootstrap-select.btn-group{margin-left:-1px}.input-prepend .bootstrap-select.btn-group{margin-right:-1px}.bootstrap-select.btn-group>.disabled{cursor:not-allowed}.bootstrap-select.btn-group>.disabled:focus{outline:0!important}.bootstrap-select.btn-group .btn .filter-option{display:inline-block;overflow:hidden;width:100%;text-align:left}.bootstrap-select.btn-group .btn .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group[class*=col-] .btn{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;z-index:1035;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu.inner{position:static;border:0;padding:0;margin:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.bootstrap-select.btn-group .dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu li:not(.disabled) a:hover small,.bootstrap-select.btn-group .dropdown-menu li:not(.disabled) a:focus small,.bootstrap-select.btn-group .dropdown-menu li.active:not(.disabled) a small{color:#64b1d8;color:rgba(100,177,216,.4)}.bootstrap-select.btn-group .dropdown-menu li.disabled a{cursor:not-allowed}.bootstrap-select.btn-group .dropdown-menu li a{cursor:pointer}.bootstrap-select.btn-group .dropdown-menu li a.opt{position:relative;padding-left:2.25em}.bootstrap-select.btn-group .dropdown-menu li a span.check-mark{display:none}.bootstrap-select.btn-group .dropdown-menu li a span.text{display:inline-block}.bootstrap-select.btn-group .dropdown-menu li small{padding-left:.5em}.bootstrap-select.btn-group .dropdown-menu .notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .no-results{padding:3px;background:#f5f5f5;margin:0 5px}.bootstrap-select.btn-group.fit-width .btn .filter-option{position:static}.bootstrap-select.btn-group.fit-width .btn .caret{position:static;top:auto;margin-top:-1px}.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark{position:absolute;display:inline-block;right:15px;margin-top:5px}.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select.show-menu-arrow.open>.btn{z-index:1035+1}.bootstrap-select.show-menu-arrow .dropdown-toggle:before{content:'';border-left:7px solid transparent;border-right:7px solid transparent;border-bottom-width:7px;border-bottom-style:solid;border-bottom-color:#ccc;border-bottom-color:rgba(204,204,204,.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle:after{content:'';border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before{bottom:auto;top:-3px;border-bottom:0;border-top-width:7px;border-top-style:solid;border-top-color:#ccc;border-top-color:rgba(204,204,204,.2)}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid #fff;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after{display:block}.bs-searchbox,.bs-actionsbox{padding:4px 8px}.bs-actionsbox{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-actionsbox .btn-group button{width:50%}.bs-searchbox+.bs-actionsbox{padding:0 8px 4px}.bs-searchbox input.form-control{margin-bottom:0;width:100%}.mobile-device{position:absolute;top:0;left:0;display:block!important;width:100%;height:100%!important;opacity:0} --------------------------------------------------------------------------------